In this lecture, we will look at primitive roots of \(p^n\) where \(p\) is prime. In the previous lecture we showed that the only numbers with primitive roots are the numbers
We particularly showed that numbers that didn’t have this form couldn’t have primitive roots. We also showed that \(p^n\) and \(2p^n\) both have primitive roots when \(n\) is \(1\). So the only remaining case is to show that when \(p\) is odd and \(n > 1\), \(p^n\) has primitive roots. In this lecture, we will focus on this case.
Proof that \(p^2\) has a Primitive Root
We want to show that \(p^n\) has a primitive root. We know that since \(p\) is prime, then \(p\) must have a primitive root. So let \(g\) be a primitive root of \(p\). Since it’s a primitive a root, then the order of \(g\) is \(\phi(p)=p-1\). That is
We’re interested in the order of \(g \pmod{p^2}\). First, observe that \(\phi(p^2)=p(p-1)\).
Now, suppose that the order of \(g \pmod{p^2}\) is \(d\). Then by definition we have
This implies that \(p^2 \mid g^d - 1\). Recall that if \(ab \mid m\), then \(a \mid m\) and \(b \mid m\). Therefore, \(p \mid g^d - 1\). That is
But we already know that the order of \(g \pmod{p}\) is exactly \(p-1\). Therefore, we must have that \(p-1 \mid d\). Moreover, we also know that \(\phi(p^2) = p(p-1)\). Then we can also conclude that \(d \mid p(p-1)\). So now we have the following two facts
- \(d \mid p(p-1)\)
- \(p-1 \mid d\)
From (2), we see that \(d\) must be a multiple of \(p-1\). From (1), it must either be \(p-1\) or \(p(p-1)\).
Now, if the order is \(p(p-1)\), then \(g\) is a primitive root of \(p^2\) and we are order. So suppose that the order is \(p-1\). That is
Now, consider \((g+p)^{p-1}\). We can expand this to see that
Any term that has \(p^2\) or greater will vanish modulo \(p^2\). So
We know the order of \(g\) is \(p-1\). So \(g^{p-1} \equiv 1 \pmod{p^2}\). Therefore,
Observe now that
why? to have \([(p-1)g^{p-2}]p\) be divisible by \(p^2\), we need \((p-1)g^{p-2}\) to be divisible by \(p\). This can’t happen because
- \(p \not\mid p - 1\)
- \(g\) is a primitive root of \(p\). So \(g^1,g^2,\cdots,g^{p-1}\) all produce non-zero residue classes modulo \(p\). So \(g^{p-2} \not\equiv 0 \pmod{p}\)
Therefore,
Then, \(g+p\) doesn’t have order \(p-1\). Therefore, it must have order \(p(p-1)\). This shows that either \(g\) is a primitive root modulo \(p^2\) or \(g+p\) is a primitive root modulo \(p^2\) (or both).
Higher Powers of \(p\)
So now what about when \(n \geq 3\)?. We notice that \(2^3\) has no primitive roots. So why does \(2\) behaves differently from all the odd primes? For this we have a theorem
Proof
By induction on \(n\).
Base Case: when \(n = 1\), then this is true by the previous lecture.
Inductive Case: Suppose \(g\) is a primitive root of \(p^{n-1}\). We want to show that \(g\) is a primitive root modulo \(p^{n}\). Recall that \(\phi(p^2) = p(p-1)\). Then, \(\phi(p^{n-1}) = p^{n-2}(p-1)\). Since \(g\) is a primitive root modulo \(p^{n-1}\). Then we must have
We can re-write this as
Now, consider raising \(g^{(p-1)p^{n-2}}\) to the power \(p\) so,
Then, we can expand \((1 + tp^{n-1})^p\) using the binomial theorem with
If we take this modulo \(p^n\), then any term with a higher power than \(p^n\) will vanish. (Note here that if \(p = 2\), then the third term doesn’t vanish! So that’s why the theorem doesn’t work for \(p=2\)) So we are left with
If \(t\) is divisible by \(p\), then
This implies that \(p^n \mid g^{(p-1)p^{n-1}} - 1\) but \(p^n = p\cdot p^{n-1}\) so \(p^{n-1}\) must also divide \(g^{(p-1)p^{n-1}} - 1\). That is
But, by the induction hypothesis, we know that the order of \(g \pmod{p^{n-1}}\) is \((p-1)p^{n-2}\). This means that we must have
In general, if we let \(o_{p^n}(g)\) be the order of \(g \pmod p^n\) and if we let \(o_{p^{n-1}}(g)\) be the order of \(g \pmod{p^{n-1}}\), then we must have
So now we have three facts
- \(o_{p^{n-1}}(g) \mid o_{p^{n}}(g)\)
- \(o_{p^{n-1}}(g) = (p-1)p^{n-2}\)
- \(o_{p^{n}}(g) \mid (p-1)p^{n-1} = p(p-1)p^{n-2}\)
From this \(o_{p^{n}}(g)\) is a multiple of \((p-1)p^{n-2}\) that also divides \(p(p-1)p^{n-2}\). So the only two possibilities for this order are:
- \(o_{p^{n}}(g) = (p-1)p^{n-2}\)
- Or \( o_{p^{n}}(g) = p(p-1)p^{n-2}\)
But then this forces the order to be \((p-1)p^{n-2}\) in this case (WHY?). The second case is when \(p \mid t\). Here we see that the order must be \((p-1)p^{n-1}\). Therefore, \(g\) is a primitive root of \(p^n\). [TODO … complete the proof]
Example
We in the previous lecture that
Which means that \(2 = -1 \pmod{3}\) is a primitive root of \(3\). But \(-1\) isn’t a primitive root of \(3^2\). So this means that \(-1 + 3 = 2\) is a primitive root of \(3^2\). So \(2\) is a primitive modulo \(3^7\).
Summary
So let’s summarize what we did so far. The following is equivalent.
- \(m\) has a primitive root.
- \(m\) has \(\varphi(\varphi(m))\) primitive roots.
- \(m = 1,2,4,p^n,2p^n\) where \(p\) is an odd prime.
- \(x^2 \equiv 1 \pmod{m}\) implies that \(x \equiv \pm 1 \pmod{m}\). That is we have two solutions only.
- Wilson's theorems holds. So \(\prod_{a \pmod{m}, (a,m)=1} a \equiv -1 \pmod{m}\)
Primitive Roots of \(2^n\)
[TODO]
NEW LECTURE
Lecture 25: Quadratic Equations modulo (p).
We looked at linear congruences and now we want to look at congruences of the form
If we complete the square then we get