6

It is well known that the integers modulo a prime $p$ form a finite field and that the multiplicative group of this finite field is cyclic, with $\phi(p-1)$ different possible choices of primitive elements that generate the cyclic group. However, if one calculates these primitive elements for various primes, their distribution seems random. So my question is whether anything is known about this. For example, suppose one works out the average of all primitive elements. One would expect that there is no bias in the size of this average, so that over various primes it should be roughly $p/2$. To quantify this conjecture, one would expect that if you divided the average by $p$ for each prime, then the average of all these values up to a prime $P$ tends to $1/2$ as $P \to \infty $. This seems like one of those statements that seems like it should be true due to lack of "biases" or "conspiracies", but is virtually hopeless to prove. Is anything known about this? ( Note that this example of the averages that should on average be $1/2$ was an example, I wonder in general about distribution: can the primitive elements all be small, all large, can they bunch up, spread out, etc. I hope I got the general gist of my question across. Thanks in advance! )

Jyrki Lahtonen
  • 142,653
Asier Calbet
  • 2,508
  • 3
    Assume that $p\equiv1\pmod4$. If $a$ is a primitive root modulo $p$, then $$p-a\equiv a\cdot(-1)\equiv a^{1+\frac{p-1}2}\pmod p.$$ As $1+(p-1)/2$ is odd, a run of Euclid's algorithm shows that $\gcd(1+\frac{p-1}2,p-1)=1$. Therefore $p-a$ is also a primitive root. This immediately implies that the average of primitive roots is exactly $p/2$ in the case $p\equiv1\pmod4$. – Jyrki Lahtonen Aug 08 '15 at 12:18
  • great thinking I hadn't realised that... – Asier Calbet Aug 08 '15 at 12:53
  • 1
    @JyrkiLahtonen What happens if $p\equiv 3 \ (\text{mod} \ 4)$? – Sungjin Kim Apr 21 '23 at 03:43
  • @SungjinKim I don't know. Modulo $7$ the primitive roots are $3$ and $5$ with a sum of $8=p+1$. Modulo $11$ they are are $2,6,7$ and $8$ with a sum of $23=2p+1$. I would very surprised if the average did not converge to $p/2$, but I haven't thought about how to prove that. Have you got any ideas? – Jyrki Lahtonen Apr 21 '23 at 17:30
  • With $p=19$ the six primitive roots add up to exactly $19\cdot6/2=57$. The next prime $p=23$ is a special case, because it is the larger prime of a Sophie Germain pair, implying that the non-squares $\neq-1$ are the primitive roots. The sum of the quadratic residues is obviously a multiple of $p$. Anyway, the ten primitive roots sum up to $139$ which differes from the expected value by quite a bit. But $23$ is exceptional also in the sense that $5$ is the smallest primitive root (explaining why there is a bias to larger than average). Anyway, I wasn't enlightened by this experimentation:-) – Jyrki Lahtonen Apr 21 '23 at 17:55
  • If you see interesting questions, bring them up in the Pearl Dive. I and a few others occasionally hand out bounties to get worthy questions answered. The activity there has been rather low lately, and we may overhaul the design of the chat room. Some time :-) – Jyrki Lahtonen Apr 25 '23 at 18:17
  • See this meta post for a description of what the Pearl Dive strives to do. – Jyrki Lahtonen Apr 25 '23 at 18:20

1 Answers1

7

Gauss proved that the sum $S_p$ of all primitive roots modulo $p$ in the interval $[1,p-1]$ is congruent to $\mu(p-1)$ modulo $p$. This result appeared several times before in MSE and a possible proof is by Mobius inversion. Then $S_p=pK+\mu(p-1)$ for some integer $K$. However, this does not give any useful information on the size of $K$, which we need for the average of primitive roots in $[1,p-1]$.

Corollary 9.20 of Montgomery and Vaughan, "Multiplicative Number Theory", vol 1, gives a uniform distribution result on the primitive roots modulo $p$, as an application of Polya-Vinogradov Inequality. We use a weaker version for simplicity.

A weaker Corollary 9.20 Montgomery and Vaughan

The number of primitive roots modulo $p$ in the interval $[M+1,M+N]$, $N>p^{0.66}$ is $$ \frac{\phi(p-1)}p N + O(p^{0.6}). $$

Consider nonoverlapping intervals $I_1,\ldots, I_L$ inside $[1,p-1]$ each of size $N=\lceil p^{2/3} \rceil$ and $L\sim p^{1/3}$. Then a lower bound of $S_p$ by using the left endpoints of each $I_j$, is $$ \sim N \frac{L^2}2 \frac{\phi(p-1)}pN \sim \phi(p-1) \frac p2.$$ We have a similar estimate of an upper bound of $S_p$ by using the right endpoints of $I_j$.

Hence, we obtain the desired result $S_p/(p\phi(p-1))\sim 1/2$. If we are more careful and using $L=p^{1/3}+O(1)$, $N=p^{2/3}+O(1)$, we obtain the error estimate of the form: $$ S_p=\phi(p-1)\frac p2 + O(p^{4/3+0.6}). $$

Sungjin Kim
  • 21,025