Euler's Totient Function — Definition, Formula & Examples
Euler's totient function, written , counts how many integers from to share no common factor with other than . For example, because only are coprime to .
For a positive integer , Euler's totient function is defined as . The function is multiplicative: if , then .
Key Formula
Where:
- = A positive integer
- = Each distinct prime factor of n
How It Works
To compute , first find the prime factorization of . Then apply the product formula, which multiplies by a factor of for each distinct prime dividing . For any prime , since every integer less than a prime is coprime to it. The multiplicative property lets you break the computation into smaller pieces when the factorization has multiple distinct primes.
Worked Example
Problem: Compute φ(36).
Factor: Find the prime factorization of 36.
Apply the formula: The distinct primes dividing 36 are 2 and 3. Substitute into the product formula.
Simplify: Multiply the factors together.
Answer: φ(36) = 12. There are 12 integers between 1 and 36 that are coprime to 36.
Visualization
Why It Matters
Euler's totient function is central to Euler's theorem: when . This theorem underpins the RSA cryptosystem, where determines the relationship between public and private encryption keys. It also appears throughout number theory in counting problems, group theory (the order of the multiplicative group mod ), and the Möbius inversion formula.
Common Mistakes
Mistake: Multiplying by (1 − 1/p) for every prime power in the factorization instead of each distinct prime once.
Correction: The product runs over distinct primes only. For n = 36 = 2² × 3², you use (1 − 1/2) and (1 − 1/3), not four separate factors.
