We will prove that there is a primitive root modulo every prime
If
is an odd prime power, then there is a primitive root
modulo
(see Exercise 2.28), but there is no primitive root
modulo the prime power
, and hence none mod
for
(see Exercise 2.27).
Section 2.5.1 is the key input to our proof that
is cyclic; here we show that for every divisor
of
there are exactly
elements of
whose order divides
.
We then use this result in Section 2.5.2 to produce an
element of
of order
when
is a prime power that
exactly divides
(i.e.,
divides
, but
does not
divide
), and multiply together these elements to obtain an element
of
of order
.
sage: for p in primes(20): ... print p, primitive_root(p) 2 1 3 2 5 2 7 3 11 2 13 2 17 3 19 2