1.3.2. Primitive roots

This section is based on parts of [BUR11, Sec. 8.1, Sec. 11.4].

Definition 1.3.2.1.

Let n>1{n>1} be an integer and a∈ℤ{a\in\mathbb{Z}} with gcd⁡(a,n)=1{\gcd(a,n)=1}. We say that aa is a primitive root of nn if

ordn⁡(a)=φ⁢(n),\operatorname{ord}_{n}(a)=\varphi(n),

the upper bound for the order given by Corollary 1.3.1.6.

Example 1.3.2.2.

We have φ⁢(2)=1{\varphi(2)=1} and hence 22 admits the primitive root 11. Also, φ⁢(4)=2{\varphi(4)=2}, 3≢1(mod4){3\not\equiv 1\pmod{4}} and 32≡1(mod4){3^{2}\equiv 1\pmod{4}} so that 44 admits the primitive root 33.

Example 1.3.2.3.

Inspecting the table in Example 1.3.1.4, we see that the integers 2,6,7,82,6,7,8 represent all primitive roots of n=11{n=11}.

Warning 1.3.2.4.

Not every integer n>1{n>1} admits a primitive root. For n=8{n=8}, φ⁢(8)=4{\varphi(8)=4} but, since

32≡52≡72≡1(mod8),3^{2}\equiv 5^{2}\equiv 7^{2}\equiv 1\pmod{8},

the orders of all integers 1≤a<8{1\leq a<8} with gcd⁡(a,8)=1{\gcd(a,8)=1} are as follows:

aa 1 3 5 7
ord8⁡(a)\operatorname{ord}_{8}(a) 1 2 2 2

Our interest in primitive roots stems from the following theorem.

Theorem 1.3.2.5.

Let n>1{n>1} be an integer and suppose that nn admits a primitive root a∈ℤ{a\in\mathbb{Z}}. Then, for each integer bb with gcd⁡(b,n)=1{\gcd(b,n)=1}, there exists a unique integer 1≤i≤φ⁢(n){1\leq i\leq\varphi(n)} such that

ai≡b(modn).a^{i}\equiv b\pmod{n}.
Proof.

By Corollary 1.3.1.9, the integers a,a2,…,aφ⁢(n)a,a^{2},\ldots,a^{\varphi(n)} are pairwise non-congruent modulo nn. Using the Division with Remainder Theorem (Theorem 1.1.1.8), for 1≤k≤φ⁢(n){1\leq k\leq\varphi(n)} write ak=qk⁢n+sk{a^{k}=q_{k}n+s_{k}} with qk,sk∈ℤ{q_{k},s_{k}\in\mathbb{Z}} and 0≤sk<n{0\leq s_{k}<n}. Since ak≡sk(modn){a^{k}\equiv s_{k}\pmod{n}}, we must have sk≠sℓ{s_{k}\neq s_{\ell}} for k≠ℓ{k\neq\ell}. Lemma 1.1.3.1 implies that

gcd⁡(sk,n)=gcd⁡(ak,n).\gcd(s_{k},n)=\gcd(a^{k},n).

Also, gcd⁡(a,n)=1{\gcd(a,n)=1} and hence gcd⁡(ak,n)=1{\gcd(a^{k},n)=1}. In particular, sk>0{s_{k}>0} (otherwise gcd⁡(sk,n)=n>1{\gcd(s_{k},n)=n>1}). It follows that the function

f:{1,2,…,φ⁢(n)}\displaystyle f\colon\{1,2,\ldots,\varphi(n)\} ⟶{b∈ℤ:1≤b<n⁢ and ⁢gcd⁡(b,n)=1}\displaystyle\longrightarrow\{b\in\mathbb{Z}\colon{1\leq b<n\text{ and }\gcd(b% ,n)=1}\}
k\displaystyle k ⟼sk\displaystyle\longmapsto s_{k}

is well defined and injective. Since the domain and codomain of ff have equal finite cardinality φ⁢(n)\varphi(n), the function ff is in fact bijective. This proves the claim for 1≤b<n{1\leq b<n}. Finally, an arbitrary integer bb with gcd⁡(b,n)=1{\gcd(b,n)=1} is congruent modulo nn to its remainder 0≤rb<n{0\leq r_{b}<n}, and gcd⁡(rb,n)=gcd⁡(b,n)=1{\gcd(r_{b},n)=\gcd(b,n)=1} (Lemma 1.1.3.1), so that rb≥1{r_{b}\geq 1}. The claim for bb follows from the claim for rbr_{b}. This finishes the proof. ∎

End of Lecture 10

Corollary 1.3.2.6.

Let n>1{n>1} be an integer. Suppose that nn admits a primitive root. Then nn admits exactly φ⁢(φ⁢(n))\varphi(\varphi(n)) primitive roots that are pairwise non-congruent modulo nn.

Proof.

Let a∈ℤ{a\in\mathbb{Z}} be a primitive root of nn. By Theorem 1.3.2.5, each primitive root of nn is congruent modulo nn to exactly one of the integers a,a2,…,aφ⁢(n)a,a^{2},\ldots,a^{\varphi(n)}, and this power of aa is then itself a primitive root of nn (Lemma 1.3.1.3). By Corollary 1.3.1.11, for 1≤k≤φ⁢(n){1\leq k\leq\varphi(n)}, the integer aka^{k} has order φ⁢(n)=ordn⁡(a){\varphi(n)=\operatorname{ord}_{n}(a)} if and only if gcd⁡(k,φ⁢(n))=1{\gcd(k,\varphi(n))=1}. Thus, the set

{k∈ℤ:1≤k≤φ⁢(n)⁢ and ⁢ordn⁡(ak)=φ⁢(n)}={k∈ℤ:1≤k≤φ⁢(n)⁢ and ⁢gcd⁡(k,φ⁢(n))=1}\{k\in\mathbb{Z}\colon{1\leq k\leq\varphi(n)\text{ and }\operatorname{ord}_{n}% (a^{k})=\varphi(n)}\}\\ =\{k\in\mathbb{Z}\colon{1\leq k\leq\varphi(n)\text{ and }\gcd(k,\varphi(n))=1}\}

has cardinality φ⁢(φ⁢(n))\varphi(\varphi(n)). This finishes the proof. ∎

Example 1.3.2.7.

We have seen in Example 1.3.2.3 that n=11{n=11} has

φ⁢(φ⁢(11))=φ⁢(10)=4\varphi(\varphi(11))=\varphi(10)=4

primitive roots 2,6,7,82,6,7,8, which are clearly pairwise non-congruent modulo 1111.

Definition 1.3.2.8.

Not covered in the lecture Let n≥0{n\geq 0} be an integer. The nnth Fermat number is the positive integer

Fn≔22n+1.F_{n}\coloneqq 2^{2^{n}}+1.

A Fermat prime is a Fermat number that is prime.

Example 1.3.2.9.

Not covered in the lectureThe first Fermat numbers are

3, 5, 17, 257, 65⁢537, 4⁢294⁢967⁢297,…3,\ 5,\ 17,\ 257,\ 65~{}537,\ 4~{}294~{}967~{}297,\ldots

The first Fermat number that is not prime is

F5=4⁢294⁢967⁢297=641⋅6⁢700⁢417.F_{5}=4~{}294~{}967~{}297=641\cdot 6~{}700~{}417.
Proposition 1.3.2.10.

Not covered in the lecture Let n>1{n>1} be an integer and suppose that Fn=22n+1{F_{n}=2^{2^{n}}+1} is prime. Then the integer 22 is not a primitive root of FnF_{n}.

Proof.

We claim that

ordFn⁡(2)≤2n+1<22n=Fn−1=φ⁢(Fn),\operatorname{ord}_{F_{n}}(2)\leq 2^{n+1}<2^{2^{n}}=F_{n}-1=\varphi(F_{n}),

where in the last equality we use that FnF_{n} is prime by assumption. The inequality 2n+1<22n{2^{n+1}<2^{2^{n}}} follows from the fact that n+1<2n{n+1<2^{n}}, and the latter can be shown easily by induction on n>1{n>1}. Notice that

22n+1−1=(22n+1)⁢(22n−1)=Fn⁢(22n−1).2^{2^{n+1}}-1=(2^{2^{n}}+1)(2^{2^{n}}-1)=F_{n}(2^{2^{n}}-1).

Since the right-hand side is clearly divisible by FnF_{n}, we obtain the congruence

22n+1≡1(modFn).2^{2^{n+1}}\equiv 1{\pmod{F_{n}}}.

By Theorem 1.3.1.5, the order ordFn⁡(2)\operatorname{ord}_{F_{n}}(2) divides 2n+12^{n+1}. In particular,

ordFn⁡(2)≤2n+1.\operatorname{ord}_{F_{n}}(2)\leq 2^{n+1}.

This finishes the proof. ∎

The aim of the forthcoming sections is to prove the following theorem.

Theorem.

Let n>1{n>1} be an integer. Then nn admits a primitive root if and only if

n=2, 4,pk, 2⁢pk,n=2,\ 4,\ p^{k},\ 2p^{k},

where pp is an odd prime and k≥1{k\geq 1} is an integer.