All topics

s5.2.3

Relatively Prime Counts and Euler’s Totient

1,000 questions

Euler's totient ϕ(n)\phi(n) counts the positive integers less than nn that share no factor with nn.

For a prime pp, every one of 1,2,,p11, 2, \ldots, p-1 qualifies, so ϕ(p)=p1\phi(p) = p - 1. For a prime power, ϕ(pk)=pkpk1\phi(p^k) = p^k - p^{k-1}.

In general, factor nn and multiply: ϕ(n)=n(11p)\phi(n) = n\prod\left(1 - \frac{1}{p}\right) over the distinct primes pp dividing nn. So ϕ(36)=361223=12\phi(36) = 36 \cdot \frac{1}{2} \cdot \frac{2}{3} = 12.

Watch the wording: "greater than 1 and less than nn" excludes 11, so subtract one from ϕ(n)\phi(n).

Practise this