Maths WorkshopMaths problems with full solutions
Exercise 845Number theory › CongruencesL1Added 3 Nov 2026

Computing $\varphi(n)$

#Euler totient#computation#prime factorization

Statement

Compute φ(36)\varphi(36).

Hint

φ(n)=n∏p∣n(1−1/p)\varphi(n)=n\prod_{p\mid n}(1-1/p).

Show solutionHide solution

Solution

Factorization. 36=22⋅3236=2^2\cdot3^2.

Formula. φ(36)=36(1−1/2)(1−1/3)=36⋅12⋅23=12\varphi(36)=36(1-1/2)(1-1/3)=36\cdot\frac12\cdot\frac23=12.

Verification. Integers ≤36\le36 coprime to 3636: 1,5,7,11,13,17,19,23,25,29,31,351,5,7,11,13,17,19,23,25,29,31,35. That is 1212 integers. Correct.

Conclusion. φ(36)=12\varphi(36)=12.