1.2.6. Euler’s Theorem

This section is based on part of [BUR11, Sec. 7.3].

The following theorem is a vast extension of Fermat’s Little Theorem (Theorem 1.2.3.1). It plays a central role in the next chapter.

Lemma 1.2.6.1.

Let m,n≥1{m,n\geq 1} be integers such that gcd⁡(m,n)=1{\gcd(m,n)=1}. For a,b∈ℤ{a,b\in\mathbb{Z}}, if a≡b(modm){a\equiv b{\pmod{m}}} and a≡b(modn){a\equiv b{\pmod{n}}}, then a≡b(modm⁢n){a\equiv b{\pmod{mn}}}.

Proof.

The claim follows by applying Corollary 1.1.3.17 to the integer c=a−b{c=a-b}, which is divisible by the coprime integers mm and nn. ∎

Theorem 1.2.6.2 (Euler’s Theorem).

Let n≥1{n\geq 1} be an integer and a∈ℤ{a\in\mathbb{Z}} with gcd⁡(a,n)=1{\gcd(a,n)=1}. Then

aφ⁢(n)≡1(modn).a^{\varphi(n)}\equiv 1\pmod{n}.
Proof.

Modulo 11, all integers are congruent to each other. Hence, we may assume n>1{n>1}.

Suppose that n>1{n>1} has prime factorisation n=p1a1⁢⋯⁢pkak{n=p_{1}^{a_{1}}\cdots p_{k}^{a_{k}}}. Suppose that

aφ⁢(piai)≡1(modpiai),1≤i≤k.a^{\varphi(p_{i}^{a_{i}})}\equiv 1\pmod{p_{i}^{a_{i}}},\qquad 1\leq i\leq k.

Since the function φ\varphi is multiplicative (Theorem 1.2.5.5), we have

φ⁢(n)=φ⁢(p1a1)⁢⋯⁢φ⁢(pkak)=φ⁢(piai)⁢φ⁢(n)φ⁢(piai),1≤i≤k;\varphi(n)=\varphi(p_{1}^{a_{1}})\cdots\varphi(p_{k}^{a_{k}})=\varphi(p_{i}^{a% _{i}})\frac{\varphi(n)}{\varphi(p_{i}^{a_{i}})},\qquad 1\leq i\leq k;

notice that φ⁢(n)/φ⁢(piai){\varphi(n)/\varphi(p_{i}^{a_{i}})} is therefore a positive integer. Hence,

aφ⁢(n)=(aφ⁢(piai))φ⁢(n)φ⁢(piai)a^{\varphi(n)}=(a^{\varphi(p_{i}^{a_{i}})})^{\frac{\varphi(n)}{\varphi(p_{i}^{% a_{i}})}}

and

aφ⁢(n)≡1(modpiai),1≤i≤k.a^{\varphi(n)}\equiv 1\pmod{p_{i}^{a_{i}}},\qquad 1\leq i\leq k.

Finally, since gcd⁡(piai,pjaj)=1{\gcd(p_{i}^{a_{i}},p_{j}^{a_{j}})=1} for i≠j{i\neq j}, inductive application of Lemma 1.2.6.1 yields the congruence

aφ⁢(n)≡1(modp1a1⁢⋯⁢pkak).a^{\varphi(n)}\equiv 1\pmod{p_{1}^{a_{1}}\cdots p_{k}^{a_{k}}}.

By the previous argument, we are reduced to proving the theorem in the case where n=pk{n=p^{k}} for a prime pp and a positive integer kk. We need to show that

aφ⁢(pk)≡1(modpk).a^{\varphi(p^{k})}\equiv 1\pmod{p^{k}}.

We prove this claim by induction on the exponent k≥1{k\geq 1}. Let k=1{k=1}. Proposition 1.2.5.3 implies that φ⁢(p)=p−1{\varphi(p)=p-1} and the congruence ap−1≡1(modp){a^{p-1}\equiv 1\pmod{p}} is shown in Fermat’s Little Theorem (Corollary 1.2.3.2). Suppose that the claim holds for some k≥1{k\geq 1}. By Theorem 1.2.5.6,

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

Since

aφ⁢(pk)≡1(modpk)a^{\varphi(p^{k})}\equiv 1\pmod{p^{k}}

by assumption, there exists an integer bb such that aφ⁢(pk)=1+b⁢pk{a^{\varphi(p^{k})}=1+bp^{k}}. Then

aφ⁢(pk+1)=ap⁢φ⁢(pk)=(aφ⁢(pk))p=(1+b⁢pk)p=∑r=0p(pr)⁢(b⁢pk)r=1+∑r=1p(pr)⁢(b⁢pk)r.a^{\varphi(p^{k+1})}=a^{p\varphi(p^{k})}=(a^{\varphi(p^{k})})^{p}=(1+bp^{k})^{% p}=\sum_{r=0}^{p}{p\choose r}(bp^{k})^{r}=1+\sum_{r=1}^{p}{p\choose r}(bp^{k})% ^{r}.

It is enough to show that

∑r=1p(pr)⁢(b⁢pk)r≡0(modpk+1).\sum_{r=1}^{p}{p\choose r}(bp^{k})^{r}\equiv 0\pmod{p^{k+1}}.

Indeed, each summand is divisible by pk+1p^{k+1}: if r=1{r=1}, then (p1)=p{{p\choose 1}=p} and the summand is p⁢(b⁢pk)=b⁢pk+1{p(bp^{k})=bp^{k+1}}; if r≥2{r\geq 2}, then k⁢r≥k+1{kr\geq k+1} and the integer (b⁢pk)r=br⁢pk⁢r{(bp^{k})^{r}=b^{r}p^{kr}} is divisible by pk+1p^{k+1}.

This finishes the proof. ∎

Remark 1.2.6.3.

Let n>1{n>1} be a composite integer. Theorem 1.2.6.2 shows that, for all a∈ℤ{a\in\mathbb{Z}} such that gcd⁡(a,n)=1{\gcd(a,n)=1}, the congruence

aφ⁢(n)≡1(modn)a^{\varphi(n)}\equiv 1{\pmod{n}}

holds. The integer nn is called a Carmichael number if the congruence

an−1≡1(modn)a^{n-1}\equiv 1{\pmod{n}}

holds for all a∈ℤ{a\in\mathbb{Z}} such that gcd⁡(a,n)=1{\gcd(a,n)=1} (compare with Corollary 1.2.3.2 and 1.2.3.3). In other words, Carmichael numbers are the composite moduli for which the statement of Corollary 1.2.3.2 holds, even though φ⁢(n)≠n−1{\varphi(n)\neq n-1} (Proposition 1.2.5.3). The smallest Carmichael number is 561=3⋅11⋅17{561=3\cdot 11\cdot 17}.