Maths WorkshopMaths problems with full solutions
Exercise 1127Number theory › PrimesL1Added 3 Nov 2026

Euler's totient of a prime power

#Euler totient#prime power#formula

Statement

Show that φ(pk)=pk−pk−1=pk−1(p−1)\varphi(p^k)=p^k-p^{k-1}=p^{k-1}(p-1) for pp prime and k≥1k\ge1.

Hint

Count integers in {1,…,pk}\{1,\ldots,p^k\} coprime to pkp^k.

Show solutionHide solution

Solution

Counting. An integer is not coprime to pkp^k iff it is divisible by pp. Among 1,…,pk1,\ldots,p^k, there are pk−1p^{k-1} multiples of pp.

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

Check. φ(8)=4\varphi(8)=4 (coprimes: 1,3,5,71,3,5,7), matching 22⋅1=42^2\cdot1=4.

Conclusion. The formula holds.