For a prime number $p$, let $\Phi(p)$ be the subset of $\{ 1, 2, \ldots, p-1 \}$ consisting of primitive roots modulo $p$. (Thus $\# \Phi(p) = \phi(p-1)$, where $\phi$ denotes the totient.) 


I am curious about the distribution of $\Phi(p)$ as $p$ varies. I imagine that this is classic analytic number theory, but I'm finding it surprisingly hard to locate a precise statement/reference.


To make my question precise, consider the following: For any continuous function $f \colon [0,1] \rightarrow {\mathbb R}$, define
$$D\_p(f) = \frac{1}{\phi(p-1)} \cdot \sum\_{x \in \Phi(p)} f \left( \frac{x}{p-1} \right).$$


Does this sequence of distributions $D\_p$ converge (e.g., weakly in measure, or in some stronger sense?) to the uniform measure or something else on $[0,1]$? What's the best current result along these lines?



Distribution of primitive roots, as p varies
Let me adjust your quantity slightly as
$$\tilde D\_p(f) := \frac{1}{\phi(p-1)}\sum\_{x \in \Phi(p)} f \left( \frac{x}{p} \right),$$
and let me initially impose the natural condition $f(0)=f(1)$. Then I claim that
$$\lim\_{p\to\infty}\tilde D\_p(f)=\int\_0^1 f(t)\,dt.$$


It suffices to show the claim when $f(t)=e^{2\pi iat}$, where $a$ is a nonzero integer. In this case, by Lemma 2 in [Carlitz's paper](http://www.numdam.org/item/CM_1956-1958__13__65_0),
$$\tilde D\_p(f)=\frac{1}{\phi(p-1)}\sum\_{x \in \Phi(p)}e\_p(ax)=\frac{1}{p-1}\sum\_{d\mid p-1}\frac{\mu(d)}{\phi(d)}\sum\_{\substack{\chi\bmod{p}\\\mathrm{ord}(\chi)=d}}\sum\_{x=1}^{p-1}\chi(x)e\_p(ax).$$
For $p$ exceeding $a$, the inner Gauss sum is always of absolute value at most $\sqrt{p}$, hence
$$\left|\tilde D\_p(f)\right|\leq\frac{\tau(p-1)}{p-1}\sqrt{p}=p^{-1/2+o(1)},$$
which tends to zero quite optimally. The proof is complete.


Now we can remove the condition $f(0)=f(1)$ by a simple formal argument. Indeed, altering $f$ in a small neighborhood of zero has little effect on $\tilde D\_p(f)$ or $\int\_0^1 f(t)\,dt$ by what we have proved already (examine bump functions around zero). Thanks to Will Sawin for pointing this out!


