Euler's Totient Function and Euler's Theorem
Euler's totient function counts the positive integers up to that are coprime to . Euler's theorem states that if , then . These tools underpin modular arithmetic, cyclic group structure, and the RSA cryptosystem. Introduced by Leonhard Euler in 1763.
The integers coprime to form a group under multiplication modulo — the unit group — and that group has exactly elements. By Lagrange's theorem, every element raised to the size of the group returns to the identity. That single structural fact, applied to a finite abelian group of units, is Euler's theorem.
Formal Statement
For a positive integer , the totient is the number of integers in the range satisfying :
Derivation hint: Directly count the residues modulo that have a multiplicative inverse; by convention since . Symbols: is the modulus; ranges over representatives of residue classes; is the greatest common divisor. Equivalently, , the order of the group of units.
If is the prime factorization of , then
Derivation hint: Compute for prime powers, then multiply across distinct primes using multiplicativity (Theorem below). Symbols: the product runs over distinct prime divisors of ; each factor removes the fraction of integers divisible by .
If , then
Derivation hint: The Chinese Remainder Theorem gives a ring isomorphism , which restricts to a bijection of unit groups, so unit counts multiply. Note: is multiplicative but not completely multiplicative; e.g. .
If and are integers with and , then
Derivation hint: represents a unit in , a finite group of order ; apply Lagrange's theorem, whose corollary forces for all . When is prime, and [4] becomes Fermat's little theorem: for .
For every positive integer ,
Derivation hint: Partition the fractions by their reduced denominator ; exactly of them reduce to a fraction with denominator .
Why It Holds
Step 1. Let , the set of residue classes coprime to . Closure holds: if then . Associativity and the identity are inherited from . Inverses exist because means is solvable by Bézout. Hence is a finite abelian group with .
Step 2. Fix and consider its cyclic subgroup . Let , the smallest positive integer with . Then .
Step 3. By Lagrange's theorem, the order of any subgroup divides the order of the group: . Write .
Step 4. Therefore
This is exactly [4].
∎Step 1. Let be a reduced residue system — one representative from each class coprime to .
Step 2. Since , the map permutes this set: each is still coprime to , and forces (cancel the unit ). So is a permutation of modulo .
Step 3. Multiply all elements of each set:
Step 4. Each is invertible, so is a unit and may be cancelled, yielding .
∎The Swiss polymath Euler introduced the totient (he wrote it as for a number ) while extending Fermat's little theorem to composite moduli, publishing the result in Theoremata arithmetica nova methodo demonstrata (1763). Across an unmatched output of nearly 900 works, Euler founded analytic number theory, introduced the zeta function and its product over primes, and codified the notation (, , , ) that students still use. The symbol for the totient was later popularized by Gauss in Disquisitiones Arithmeticae (1801), where the function received its systematic treatment.
Building Intuition
Think of as a sieve count. Start with all integers from to ; the factor in [2] discards exactly the fraction that are divisible by . Because divisibility by distinct primes is "independent" (a probabilistic shadow of the Chinese Remainder Theorem), you simply multiply the surviving fractions. For Euler's theorem, picture the units modulo as beads on a finite necklace. Multiplying everything by a unit just rotates the necklace — it relabels the beads without losing any. Since the necklace has beads, repeating the rotation times (i.e. raising to the power) lands you exactly back where you started.
Worked Examples
Given: .
Step 1 — Factor: .
Step 2 — Apply product form [2]:
Step 3 — Multiply: .
Check via fractions: ✓
Given: compute (the last two digits in base 10).
Step 1 — Totient of modulus: , so .
Step 2 — Check coprimality: , so Euler's theorem [4] gives .
Step 3 — Reduce the exponent mod 40: , so .
Step 4 — Evaluate: .
Common Misconceptions
Euler's theorem requires coprimality. The congruence holds only when . If shares a factor with , is not a unit and the conclusion generally fails — for such cases use the Carmichael function or handle prime-power factors separately. Also: reducing exponents works modulo , not modulo . To simplify , reduce modulo (when ), never modulo itself.
Take and . Here , and . Euler's theorem would predict , but , not . The hypothesis fails, so the conclusion fails. Indeed for all — the powers of never reach .
is not completely multiplicative. One might guess always, but [3] requires . With (not coprime): , whereas .
Connections
Euler's theorem is the composite-modulus parent of Fermat's Little Theorem (the prime case) and a direct corollary of Lagrange's Theorem applied to the Group of Units Modulo n. The product formula [2] flows from the Chinese Remainder Theorem and exhibits as a Multiplicative Function in Analytic Number Theory, where it appears in the Dirichlet Series identity . The divisor-sum identity [5] is a clean application of Möbius Inversion, giving . Structurally, measures the order of the abelian group studied in Cyclic Groups and Primitive Roots.
Real-World Applications
Historical Development
Subtleties & Limits
Lehmer's totient problem (1932) asks whether there exists a composite with . Every prime satisfies ; D. H. Lehmer conjectured no composite does, but the question remains open. Any counterexample must be odd, squarefree, and have at least 15 prime factors exceeding . Relatedly, Carmichael's totient conjecture posits that no value of is attained exactly once — for every there is some with ; verified to enormous bounds but unproven. These show that despite its elementary definition, still hides deep mysteries.
See Also
Fermat's Little Theorem · Lagrange's Theorem · Group of Units Modulo n · Chinese Remainder Theorem · Carmichael Function · Primitive Roots · Möbius Function and Inversion · RSA Cryptosystem · Multiplicative Function