Lecture 24 - Moduli without Primitive Roots

# Summary

In today's class we finished proving a critical result concerning the number of elements of order d modulo p, where p is a prime number. This let's us conclude that primitive roots do exist modulo p. We then spent the second half of the class discussing integers for which primitive roots do not exist. We finished the class by classifying exactly those integers which do have primitive roots.

# Counting elements of order d modulo p

Last class period we talked about primitive roots modulo p, where p was an odd prime number. The key result was a proof of the following

Theorem: If $d \mid p-1$, then there are precisely $\phi(d)$ elements of order d mod p.

We start today by giving a proof of this result

Proof: For a given divisor d, let $f(d)$ be the number of elements of order d mod p. We saw last class period that there are exactly d solutions to $x^d-1 \equiv 0 \mod{p}$. Therefore we have

(1)
\begin{align} d = \#\{1 \leq a \leq p: a^d-1 \equiv 0 \mod{p}\}. \end{align}

But notice that if $a^d - 1 \equiv 0 \mod{p}$ then we get $a^d \equiv 1 \mod{p}.$ This in turn tells us that $\mbox{ord}_p(a) \mid d$. Hence any element $a$ in the set above must be an element of order c, where c is a divisor of c. Hence we have

(2)
\begin{align} \{1 \leq a \leq p : a^d-1\equiv 0 \mod{p}\} = \bigcup_{c \mid d}\{1 \leq a \leq p: \mbox{ord}_p(a) = c\}. \end{align}

By counting the number of elements on the left- and right-hand sides, we get

(3)
\begin{split} d &= \#\{1 \leq a \leq p : a^d-1\equiv 0 \mod{p}\} \\&= \#\left(\bigcup_{c \mid d}\{1 \leq a \leq p: \mbox{ord}_p(a) = c\}\right) \\&= \sum_{c \mid d}\#\{1 \leq a \leq p: \mbox{ord}_p(a) = c\} \\&= \sum_{c \mid d}f(c). \end{split}

On the other hand, we saw long ago that

(4)
\begin{align} d = \sum_{c \mid d}\phi(c). \end{align}

Hence we can combine (3) and (4) to give

(5)
\begin{align} \sum_{c \mid d}f(c) = \sum_{c \mid d}\phi(c). \end{align}

Translated into convolutions, this says $(P_0 * f)(d) = (P_0*\phi)(d)$. Convolving by $\mu$ then gives

(6)
\begin{align} (\mu*P_0*f)(d) = (\mu*P_0*\phi)(d) \Longleftrightarrow f(d) = \phi(d). \end{align}

$\square$

As a consequence of this result, we see that primitive roots exist for any prime modulus.

Corollary: For any prime p, there are exactly $\phi(p-1)$ many primitive roots.

Proof: Take $d = p-1$ in the above result, and remember that a primitive root mod p is an element of order $p-1$. $\square$

#### Example: Orders of Elements mod 17

Let's find out how many elements of each order exist modulo 17 (just to confirm the result we proved). Notice that an element mod 17 must have order from the set $\{1,2,4,8,16\}$, since these are the divisors of $\phi(17) = 16$. Using this fact, notice that we have

(7)
\begin{split} 3^1 &\not\equiv 1 \mod{17}\\ 3^2 &\equiv 9 \not\equiv 1 \mod{17}\\ 3^{4} &\equiv 9^2 \equiv 81 \equiv 13 \mod{17} \quad \quad (\mbox{since }81 = 4*17+13)\\ 3^{8} &\equiv (13)^2 \equiv (-4)^2 \equiv 16 \equiv -1 \not\equiv 1 \mod{17}. \end{split}

Hence 3 is a primitive root. This will make computing the orders of other elements easier.

$3^j$ $\mbox{gcd}(16,j)$ $\mbox{ord}_{17}(3^j)$ $3^j$ $\mbox{gcd}(16,j)$ $\mbox{ord}_{17}(3^j)$
31 1 16 39 1 16
32 2 8 310 2 8
33 1 16 311 1 16
34 4 4 312 4 4
35 1 16 313 1 16
36 2 8 314 2 8
37 1 16 315 1 16
38 8 2 316 16 1

Notice that we have $\phi(16) = 8$ elements of order 16, $\phi(8) = 4$ elements of order 8, $\phi(4) = 2$ elements of order 4, $\phi(2)=1$ element of order 2, and $\phi(1) = 1$ element of order 1.

# Moduli Without Primitive Roots

Now that we've spent some time talking about moduli m which do have primitive roots, let's find a few that don't have primitive roots. We've already seen in class that 8 has no primitive roots. What about higher powers of 2?

Proposition: There is no primitive root modulo $2^m$, where $m \geq 3$.

Proof: We'll prove this result by induction. The base case ($m=3$) was done in class some time ago. Now let a be a given integer relatively prime to $2^m$. This means that a is an odd number. We'll show that

(8)
\begin{align} a^{2^{m-2}} \equiv 1 \mod{2^m}. \end{align}

Since $\phi(2^m) = 2^{m-1}$, this will prove that there is no primitive root mod $2^m$.

Now by induction we know $a^{2^{m-3}} \equiv 1 \mod{2^{m-1}}$. Hence

(9)
\begin{equation} a^{2^{m-3}} = 1 + c2^{m-1}. \end{equation}

Squaring both sides of this equation gives

(10)
\begin{align} a^{2^{m-2}} = 1 + c2^m + c^22^{2(m-1)} \equiv 1 \mod{2^m}. \end{align}

$\square$

This rules out an infinite class of integers from having primitive roots. This next result will cut out even more.

Proposition: There are no primitive roots modulo mn if m,n are relatively prime integers greater than 2.

Proof: Since m,n are relatively prime, this implies $\phi(mn) = \phi(m)\phi(n)$. Hence a primitive root mod mn would need to have order $\phi(m)\phi(n)$. Instead, we'll show that if $(a,mn) = 1$, then we have

(11)
\begin{align} a^{\frac{\phi(m)\phi(n)}{2}} \equiv 1 \mod{mn}. \end{align}

This means that no element mod mn can be a primitive root, and so it gives the result we want.

Now since $m,n>2$ we know that 2 is a common divisor of $\phi(m)$ and $\phi(n)$. Now we'll compute a raised to $\frac{\phi(m)\phi(n)}{2}$ mod m and n, then stitch these results together. We have

(12)
\begin{split} a^{\frac{\phi(m)\phi(n)}{2}} &\equiv \left(a^{\phi(m)}\right)^{\frac{\phi(n)}{2}} \equiv 1^{\frac{\phi(n)}{2}} \equiv 1 \mod{m}\\ a^{\frac{\phi(n)\phi(m)}{2}} &\equiv \left(a^{\phi(n)}\right)^{\frac{\phi(m)}{2}} \equiv 1^{\frac{\phi(m)}{2}} \equiv 1 \mod{n}.\\ \end{split}

Putting these together with CRT, we see that Equation (11) is true. $\square$

The two previous results together tells us that

Corollary: If m has a primitive root, then m is either 1,2,4, a power of an odd prime, or twice a power of an odd prime.

In the next class period, we'll show that — in fact — all these values of m which might have primitive roots do, in fact, have primitive roots.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License