In order to find primitive roots, we might want a better approach than simply trying every single power of for every until we find one. Letβs walk through an example to motivate a new approach, using a small modulus.
We know by Theorem 8.3.12 that the order of an element has to divide , so we could try and ; no other could yield 1. In fact, if those arenβt , there arenβt any other possible orders out there, so that would work as a primitive root.
Letβs try this with .
(mod and (mod ,
so must be a primitive root.
What about with ?
(mod ,
so that seems promising, but
(mod
so cannot be a primitive root modulo eleven (and in fact has order five).
The moral is that we didnβt have to check all ten possible powers of or to decide whether was a primitive root modulo eleven. If you arenβt confident of this idea, try using this strategy to determine which of is a primitive root (exactly one of them is).
As far as I understand, the following strategy is how even Sage tests for finding primitive roots, at least for basic cases. You can check for yourself by looking at the code from the component program, PARIβ1β
This proof is a little terse, so letβs unpack this test. Essentially, we change two things from the initial idea of trying all divisors of :
Instead of trying powers which are divisors of , we try powers which are divided by divisors. So becomes and becomes . That seems like itβs not doing anything other than rewriting, but at least it organizes things differently.
Then, instead of having to try all , we use a trick to just need prime divisors . (See the proof.)
If you tried various and various attempts at primitive roots above, you will see that Lemma 10.2.3 really works. Make sure you are trying that are actually coprime to , though! As it turns out, there arenβt very many test powers to try, since in general doesnβt have a lot of prime divisors, even if is a fairly large prime.
The lemma also makes easy some statements that would otherwise be quite hard. For instance, you should (Exercise 10.6.2) see how to use the test lemma to prove that if is a primitive root of , then so is (modulo ).
If you did the table at the beginning of this subsection properly, you will note that and are a pair of primitive roots of seventeen. There should be three other such pairs.
On the other hand, from the proof we can see that if is even, but not divisible by four, then we expect that if is a PR then will not be. For example, since two is a primitive root of eleven in Example 10.2.1, we expect that nine is not; try computing this yourself.