1.3.4. Primitive roots for composite integers

This section is based on [BUR11, Sec. 8.3]. In it, we complete the proof of Theorem 1.3.4.9.

Proposition 1.3.4.1.

Let k>2{k>2} be an integer. The integer 2k2^{k} does not admit a primitive root.

Proof.

For a∈ℤ{a\in\mathbb{Z}},

gcd⁡(a,2k)=1⟺a⁢ is odd.\gcd(a,2^{k})=1\quad\Longleftrightarrow\quad a\text{ is odd}.

Moreover, by Theorem 1.2.5.6,

φ⁢(2k)=2k⁢(1−12)=2k−1.\varphi(2^{k})=2^{k}\Big{(}1-\frac{1}{2}\Big{)}=2^{k-1}.

Thus, it is enough to prove that every odd integer has order at most 2k−2=φ⁢(2k)/2{2^{k-2}=\varphi(2^{k})/2}.

Let a∈ℤ{a\in\mathbb{Z}} be odd. By definition of the order, it is enough to show that

a2k−2≡1(mod2k).a^{2^{k-2}}\equiv 1\pmod{2^{k}}.

We prove the claim by induction on k≥3{k\geq 3} (it fails for k=2{k=2}, since 3≢1(mod4){3\not\equiv 1\pmod{4}}). For k=3{k=3}, we have 2k=8{2^{k}=8} and 2k−2=2{2^{k-2}=2}. In this case,

a2≡1(mod8)a^{2}\equiv 1\pmod{8}

by direct computation. Indeed,

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

and every odd integer aa is congruent modulo 88 to 1,3,51,3,5 or 77. Let k≥3{k\geq 3} and suppose that

a2k−2≡1(mod2k).a^{2^{k-2}}\equiv 1\pmod{2^{k}}.

We need to prove that

a2k−1≡1(mod2k+1).a^{2^{k-1}}\equiv 1\pmod{2^{k+1}}.

By definition, there exists b∈ℤ{b\in\mathbb{Z}} such that a2k−2=1+2k⁢b{a^{2^{k-2}}=1+2^{k}b}. Consequently,

a2k−1=(a2k−2)2=(1+2k⁢b)2=1+2k+1⁢b+22⁢k⁢b2=1+2k+1⁢(b+2k−1⁢b2).a^{2^{k-1}}=(a^{2^{k-2}})^{2}=(1+2^{k}b)^{2}=1+2^{k+1}b+2^{2k}b^{2}=1+2^{k+1}(% b+2^{k-1}b^{2}).

Therefore, a2k−1−1{a^{2^{k-1}}-1} is divisible by 2k+12^{k+1}, as required. ∎

Proposition 1.3.4.2.

Let m,n>2{m,n>2} be integers. If gcd⁡(m,n)=1{\gcd(m,n)=1}, then the integer m⁢nmn does not admit a primitive root.

Proof.

Let a∈ℤ{a\in\mathbb{Z}} with gcd⁡(a,m⁢n)=1{\gcd(a,mn)=1}. We prove that ordm⁢n⁡(a)≤φ⁢(m⁢n)/2{\operatorname{ord}_{mn}(a)\leq\varphi(mn)/2}. Set

d≔gcd⁡(φ⁢(m),φ⁢(n))d\coloneqq\gcd(\varphi(m),\varphi(n))

so that φ⁢(m)/d\varphi(m)/d and φ⁢(n)/d\varphi(n)/d are positive integers. Since gcd⁡(m,n)=1{\gcd(m,n)=1} by assumption, Theorem 1.2.5.5 yields

φ⁢(m⁢n)=φ⁢(m)⁢φ⁢(n)=ℓ⁢d,ℓ≔φ⁢(m⁢n)/d.\varphi(mn)=\varphi(m)\varphi(n)=\ell d,\qquad\ell\coloneqq\varphi(mn)/d.

Since m,n>2{m,n>2}, the integers φ⁢(m)\varphi(m) and φ⁢(n)\varphi(n) are even (Theorem 1.2.5.7) and therefore d≥2{d\geq 2}. Hence,

ℓ=φ⁢(m)⁢φ⁢(n)d≤φ⁢(m)⁢φ⁢(n)2=φ⁢(m⁢n)2<φ⁢(m⁢n).\ell=\frac{\varphi(m)\varphi(n)}{d}\leq\frac{\varphi(m)\varphi(n)}{2}=\frac{% \varphi(mn)}{2}<\varphi(mn).

By definition of the order, it is enough to show that

aℓ≡1(modm⁢n).a^{\ell}\equiv 1\pmod{mn}.

By Corollary 1.1.3.16, we have gcd⁡(a,m)=gcd⁡(a,n)=1{\gcd(a,m)=\gcd(a,n)=1}. Euler’s Theorem (Theorem 1.2.6.2) for the modulus mm yields

aφ⁢(m)≡1(modm)a^{\varphi(m)}\equiv 1\pmod{m}

and hence, since

aℓ=aφ⁢(m)⁢φ⁢(n)/d=(aφ⁢(m))φ⁢(n)/d,a^{\ell}=a^{\varphi(m)\varphi(n)/d}=(a^{\varphi(m)})^{\varphi(n)/d},

Proposition 1.2.1.6(6) implies that

aℓ≡1(modm).a^{\ell}\equiv 1\pmod{m}.

Exchanging the roles of mm and nn,

aℓ≡1(modn).a^{\ell}\equiv 1\pmod{n}.

Finally, since gcd⁡(m,n)=1{\gcd(m,n)=1}, Lemma 1.2.6.1 applied to the last two congruences yields the congruence

aℓ≡1(modm⁢n).a^{\ell}\equiv 1\pmod{mn}.

This finishes the proof. ∎

Corollary 1.3.4.3.

Let n≥1{n\geq 1} be an integer. Suppose that nn is divisible by two distinct odd primes. Then nn does not admit a primitive root.

Exercise. The proof will be added later.

Corollary 1.3.4.4.

Let n≥1{n\geq 1} be an integer. Suppose that nn is divisible by 4⁢p4p where pp is an odd prime. Then nn does not admit a primitive root.

Exercise. The proof will be added later.

Lemma 1.3.4.5.

Let pp be a prime and k≥2{k\geq 2} an integer. Let rr be a primitive root of pp. If rpk−2⁢(p−1)≢1(modpk){r^{p^{k-2}(p-1)}\not\equiv 1\pmod{p^{k}}}, then rr is also a primitive root of pkp^{k}.

Proof.

Since gcd⁡(r,p)=1{\gcd(r,p)=1}, also gcd⁡(r,pk)=1{\gcd(r,p^{k})=1}. Set n≔ordpk⁡(r){n\coloneqq\operatorname{ord}_{p^{k}}(r)}. Corollary 1.3.1.6 applied to the modulus pkp^{k} implies that ordpk⁡(r)\operatorname{ord}_{p^{k}}(r) divides

φ⁢(pk)=pk−pk−1=pk−1⁢(p−1);\varphi(p^{k})=p^{k}-p^{k-1}=p^{k-1}(p-1);

here, in the second equality we use Theorem 1.2.5.6. Hence, there exists a∈ℤ{a\in\mathbb{Z}} such that pk−1⁢(p−1)=a⁢n{p^{k-1}(p-1)=an}.

Since n=ordpk⁡(r){n=\operatorname{ord}_{p^{k}}(r)}, the congruence rn≡1(modpk){r^{n}\equiv 1\pmod{p^{k}}} holds, and we also must have rn≡1(modp){r^{n}\equiv 1\pmod{p}}. Therefore, by Theorem 1.3.1.5 applied to the modulus pp, we obtain that ordp⁡(r)=φ⁢(p)=p−1{\operatorname{ord}_{p}(r)=\varphi(p)=p-1} divides nn. Since n=ordpk⁡(r)>0{n=\operatorname{ord}_{p^{k}}(r)>0}, there exists b∈ℤ+{b\in\mathbb{Z}_{+}} such that

n=b⁢(p−1).n=b(p-1).

Therefore,

pk−1⁢(p−1)=a⁢n=a⁢b⁢(p−1)p^{k-1}(p-1)=an=ab(p-1)

and, consequently, pk−1=a⁢b{p^{k-1}=ab}. Given that pp is prime, b>0{b>0} and b∣pk−1{b\mid p^{k-1}}, Corollary 1.1.4.9 implies that b=pm{b=p^{m}} for some 0≤m≤k−1{0\leq m\leq k-1} so that

n=pm⁢(p−1).n=p^{m}(p-1).

If m=k−1{m=k-1}, then

ordpk⁡(r)=n=pk−1⁢(p−1)=φ⁢(pk),\operatorname{ord}_{p^{k}}(r)=n=p^{k-1}(p-1)=\varphi(p^{k}),

and rr is a primitive root of pkp^{k} in this case. We thus analyse the case 0≤m≤k−2{0\leq m\leq k-2}. In this case, ordpk⁡(r)=n=pm⁢(p−1){\operatorname{ord}_{p^{k}}(r)=n=p^{m}(p-1)} divides pk−2⁢(p−1){p^{k-2}(p-1)} and, by Theorem 1.3.1.5, we have

rpk−2⁢(p−1)≡1(modpk).r^{p^{k-2}(p-1)}\equiv 1\pmod{p^{k}}.

This shows that the condition rpk−2⁢(p−1)≢1(modpk){r^{p^{k-2}(p-1)}\not\equiv 1\pmod{p^{k}}} implies m=k−1{m=k-1}, that is, that rr is a primitive root of pkp^{k}. This finishes the proof. ∎

Remark 1.3.4.6.

For p=2{p=2} and k>2{k>2}, the hypothesis of Lemma 1.3.4.5 is never satisfied: the proof of Proposition 1.3.4.1 shows that r2k−2≡1(mod2k){r^{2^{k-2}}\equiv 1\pmod{2^{k}}} for every odd integer rr.

End of Lecture 12

Theorem 1.3.4.7.

Let pp be an odd prime and k≥1{k\geq 1} an integer. Then pkp^{k} admits a primitive root.

Proof.

Theorem 1.3.3.7 implies that the claim holds for k=1{k=1}. For k≥2{k\geq 2}, the theorem follows by applying Lemma 1.3.4.5 to the primitive root ss in the following claim:

There exists a primitive root ss of pp such that

spm−2⁢(p−1)≢1(modpm)for every ⁢m≥2.s^{p^{m-2}(p-1)}\not\equiv 1\pmod{p^{m}}\qquad\text{for every }m\geq 2.

To prove this claim, we first find a primitive root ss of pp such that sp−1≢1(modp2){s^{p-1}\not\equiv 1\pmod{p^{2}}}, which is the case m=2{m=2}. Let rr be an arbitrary primitive root of pp. If rp−1≢1(modp2){r^{p-1}\not\equiv 1\pmod{p^{2}}}, then we can take s=r{s=r}. Otherwise, set s≔r+p{s\coloneqq r+p}. Since s≡r(modp){s\equiv r\pmod{p}}, the integer ss is also a primitive root of pp. By the Binomial Theorem,

sp−1=(p+r)p−1\displaystyle s^{p-1}=(p+r)^{p-1} =∑ℓ=0p−1(p−1ℓ)⁢pℓ⁢rp−1−ℓ\displaystyle=\sum_{\ell=0}^{p-1}{p-1\choose\ell}p^{\ell}r^{p-1-\ell}
=rp−1+(p−1)⁢p⁢rp−2+∑ℓ=2p−1(p−1ℓ)⁢pℓ⁢rp−1−ℓ⏟≡0(modp2).\displaystyle=r^{p-1}+(p-1)pr^{p-2}+\underbrace{\sum_{\ell=2}^{p-1}{p-1\choose% \ell}p^{\ell}r^{p-1-\ell}}_{\equiv 0{\pmod{p^{2}}}}.

For ℓ≥2{\ell\geq 2}, the ℓ\ellth summand is divisible by p2p^{2}, and hence

sp−1≡rp−1+(p−1)⁢p⁢rp−2(modp2)s^{p-1}\equiv r^{p-1}+(p-1)pr^{p-2}\pmod{p^{2}}

since (p−11)=p−1{{p-1\choose 1}=p-1}. Moreover, rp−1≡1(modp2){r^{p-1}\equiv 1\pmod{p^{2}}} by assumption, and therefore

sp−1≡1−p⁢rp−2(modp2).s^{p-1}\equiv 1-pr^{p-2}\pmod{p^{2}}.

Here, we use the various properties of the congruence relation established in Proposition 1.2.1.6 and that

p2⁢rp−2≡0(modp2).p^{2}r^{p-2}\equiv 0{\pmod{p^{2}}}.

Given that rr is a primitive root of pp, we have gcd⁡(r,p)=1{\gcd(r,p)=1} and then also gcd⁡(rp−2,p)=1{\gcd(r^{p-2},p)=1}. Thus, by the above,

sp−1≡1(modp2)⇔p⁢rp−2≡0(modp2)⇔rp−2≡0(modp),s^{p-1}\equiv 1\pmod{p^{2}}\quad\Leftrightarrow\quad pr^{p-2}\equiv 0\pmod{p^{% 2}}\quad\Leftrightarrow\quad r^{p-2}\equiv 0\pmod{p},

but the latter condition is false since rr is a primitive root of pp and hence rp−2r^{p-2} is not divisible by pp. This shows that sp−1≢1(modp2){s^{p-1}\not\equiv 1\pmod{p^{2}}}.

We now prove, by induction on m≥2{m\geq 2}, that this primitive root ss satisfies the required condition for every m≥2{m\geq 2}. The case m=2{m=2} holds by the choice of ss. Suppose now that

spm−2⁢(p−1)≢1(modpm)s^{p^{m-2}(p-1)}\not\equiv 1\pmod{p^{m}}

for some integer m≥2{m\geq 2}. Since

gcd⁡(s,pm−1)=gcd⁡(s,pm)=1\gcd(s,p^{m-1})=\gcd(s,p^{m})=1

and, by Theorem 1.2.5.6,

φ⁢(pm−1)=pm−1−pm−2=pm−2⁢(p−1),\varphi(p^{m-1})=p^{m-1}-p^{m-2}=p^{m-2}(p-1),

Euler’s Theorem (Theorem 1.2.6.2) yields

spm−2⁢(p−1)≡1(modpm−1)s^{p^{m-2}(p-1)}\equiv 1\pmod{p^{m-1}}

so that there exists a∈ℤ{a\in\mathbb{Z}} such that

spm−2⁢(p−1)=1+pm−1⁢a.s^{p^{m-2}(p-1)}=1+p^{m-1}a.

We must have a≢0(modp){a\not\equiv 0\pmod{p}}; otherwise the induction hypothesis would fail. Using the Binomial Theorem again, we compute

spm−1⁢(p−1)\displaystyle s^{p^{m-1}(p-1)} =(spm−2⁢(p−1))p=(1+pm−1⁢a)p\displaystyle=(s^{p^{m-2}(p-1)})^{p}=(1+p^{m-1}a)^{p}
=∑ℓ=0p(pℓ)⁢p(m−1)⁢ℓ⁢aℓ\displaystyle=\sum_{\ell=0}^{p}{p\choose\ell}p^{(m-1)\ell}a^{\ell}
=1+(p1)⁢pm−1⁢a⏟=pm⁢a+∑ℓ=2p−1(pℓ)⁢p(m−1)⁢ℓ⁢aℓ⏟≡0(modpm+1)+p(m−1)⁢p⁢ap⏟≡0(modpm+1),\displaystyle=1+\underbrace{{p\choose 1}p^{m-1}a}_{=p^{m}a}+\sum_{\ell=2}^{p-1% }\underbrace{{p\choose\ell}p^{(m-1)\ell}a^{\ell}}_{\equiv 0{\pmod{p^{m+1}}}}+% \underbrace{p^{(m-1)p}a^{p}}_{\equiv 0{\pmod{p^{m+1}}}},

and hence

spm−1⁢(p−1)≡1+pm⁢a(modpm+1).s^{p^{m-1}(p-1)}\equiv 1+p^{m}a\pmod{p^{m+1}}.

Here, the summands for ℓ=0{\ell=0} and ℓ=1{\ell=1} are 11 and (p1)⁢pm−1⁢a=pm⁢a{{p\choose 1}p^{m-1}a=p^{m}a}, since (p1)=p{{p\choose 1}=p}. Moreover, we use that, for 2≤ℓ<p{2\leq\ell<p}, the prime pp divides

(pℓ)=p!ℓ!⁢(p−ℓ)!{p\choose\ell}=\frac{p!}{\ell!(p-\ell)!}

so that the ℓ\ellth summand is divisible by

p⁢p(m−1)⁢ℓ=p(m−1)⁢ℓ+1,pp^{(m-1)\ell}=p^{(m-1)\ell+1},

which itself is divisible by pm+1p^{m+1} since

(m−1)⁢ℓ+1≥m+1.(m-1)\ell+1\geq m+1.

The ppth summand p(m−1)⁢p⁢app^{(m-1)p}a^{p} is also divisible by pm+1p^{m+1} since (m−1)⁢p≥m+1{(m-1)p\geq m+1} (recall that m≥2{m\geq 2} and p≥3{p\geq 3}).

Finally, since p∤a{p\nmid a}, we have pm⁢a≢0(modpm+1){p^{m}a\not\equiv 0\pmod{p^{m+1}}}. This shows that

spm−1⁢(p−1)≢1(modpm+1).s^{p^{m-1}(p-1)}\not\equiv 1\pmod{p^{m+1}}.

This finishes the proof of the theorem. ∎

Corollary 1.3.4.8.

Not covered in the lecture Let pp be an odd prime and k≥1{k\geq 1} an integer. The integer 2⁢pk2p^{k} admits a primitive root.

Proof.

By Theorem 1.3.4.7, there exists a primitive root rr of pkp^{k}. We claim that we may assume that rr is odd. Indeed, if rr is even, then r+pk{r+p^{k}} is odd, congruent to rr modulo pkp^{k}, and hence it is also a primitive root of pkp^{k} (Lemma 1.3.1.3). Suppose then that rr is odd, so that in particular gcd⁡(r,2⁢pk)=1{\gcd(r,2p^{k})=1} since gcd⁡(r,pk)=1{\gcd(r,p^{k})=1} because rr is a primitive root of pkp^{k}. We claim that rr is a primitive root of 2⁢pk2p^{k}. Set n≔ord2⁢pk⁡(r){n\coloneqq\operatorname{ord}_{2p^{k}}(r)}. By Corollary 1.3.1.6, the order nn divides

φ⁢(2⁢pk)=φ⁢(2)⁢φ⁢(pk)=1⋅φ⁢(pk)=φ⁢(pk).\varphi(2p^{k})=\varphi(2)\varphi(p^{k})=1\cdot\varphi(p^{k})=\varphi(p^{k}).

Here, the first equality uses Theorem 1.2.5.5. Finally, the congruence

rn≡1(mod2⁢pk)r^{n}\equiv 1\pmod{2p^{k}}

implies that rn≡1(modpk){r^{n}\equiv 1\pmod{p^{k}}} (since pkp^{k} divides 2⁢pk2p^{k}, keeping in mind Proposition 1.1.1.6(9)). Theorem 1.3.1.5 then implies that

ordpk⁡(r)=φ⁢(pk)=φ⁢(2⁢pk)\operatorname{ord}_{p^{k}}(r)=\varphi(p^{k})=\varphi(2p^{k})

divides nn. This shows that

φ(2pk)∣ord2⁢pk(r)andord2⁢pk(r)∣φ(2pk).\varphi(2p^{k})\mid\operatorname{ord}_{2p^{k}}(r)\qquad\text{and}\qquad% \operatorname{ord}_{2p^{k}}(r)\mid\varphi(2p^{k}).

Proposition 1.1.1.6(8) implies that ord2⁢pk⁡(r)=φ⁢(2⁢pk){\operatorname{ord}_{2p^{k}}(r)=\varphi(2p^{k})}, since both are positive, so that rr is indeed a primitive root of 2⁢pk2p^{k}. ∎

Theorem 1.3.4.9.

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.

Exercise. The proof will be added later.