Maths WorkshopMaths problems with full solutions
Exercise 1997Number theory › CongruencesOlympiadAdded 5 Nov 2026

n divides φ(aⁿ − 1)

#order#Euler's theorem#totient

Statement

Let a≥2a\ge2 and n≥1n\ge1 be integers. Prove that n∣φ(an−1)n\mid\varphi(a^n-1).

Hint

Let N=an−1N=a^n-1. Compute the order of aa modulo NN exactly.

Show solutionHide solution

Solution

Setup. Put N=an−1≥1N=a^n-1\ge1. If N=1N=1 then φ(1)=1\varphi(1)=1 and 1∣11\mid1, fine. Assume N≥2N\ge2.

Coprimality. a⋅an−1=an≡1(modN)a\cdot a^{n-1}=a^n\equiv1\pmod N, so aa is invertible modulo NN.

The order is nn. an≡1(modN)a^n\equiv1\pmod N. If 1≤k<n1\le k<n, then 0<ak−1<an−1=N0<a^k-1<a^n-1=N, so N∤ak−1N\nmid a^k-1, i.e. ak≢1(modN)a^k\not\equiv1\pmod N. Hence the order of aa modulo NN is exactly nn.

Euler. aφ(N)≡1(modN)a^{\varphi(N)}\equiv1\pmod N, so the order nn divides φ(N)=φ(an−1)\varphi(N)=\varphi(a^n-1).

Check. a=2a=2, n=4n=4: N=15N=15, φ(15)=8\varphi(15)=8, 4∣84\mid8 ✓. a=3a=3, n=3n=3: N=26N=26, φ(26)=12\varphi(26)=12, 3∣123\mid12 ✓.

Lesson. To show n∣φ(N)n\mid\varphi(N), exhibit an element of order exactly nn modulo NN.