Overview

this section will go over Euler's Totient theorem, a fundamental theorem in modular arithmetic which appears in numerous competitions from AMC to USAMO.

Key Ideas

  • The theorem states that for coprime integers a and n, then aϕ(n)≡1a^{\phi(n)} \equiv 1 mod n where ϕ(n)\phi(n) is equal to the number of integers k<nk \lt n which are coprime to n.

  • This theorem has the advantage over Fermat's little theorem in that n is not restricted to being a prime, meaning you can apply this theorem to composite numbers.

  • Euler's Totient function of an integer n calculates the quantity of numbers which are coprime to n. We can calculate this by using another theorem, namely

ϕ(n)=n∏p∣n=p1(1−1p1)p2(1−1p2)⋯pn(1−1pn)\phi(n) = n \prod_{p | n} = p_{1}(1 -\frac{1}{p_{1}}) p_{2} (1- \frac{1}{p_{2}}) \cdots p_{n} (1-\frac{1}{p_{n}})

where the product is taken over all distinct primes which divide n. Furthermore, Euler's Totient function is multiplicative, meaning that ϕ(ab)=ϕ(a)ϕ(b)\phi(ab) = \phi(a) \phi(b) for all a,b∈Za,b \in \mathbb{Z}.

Worked Example

(AoPS) Find the last 2 digits of 781−3817^{81} - 3^{81}.

First, notice that the last 2 digits of the expression is simply the result when taken mod 100, and ϕ(n)=40\phi(n) = 40. Therefore we can use Euler's theorem to reduce the expression to 71−31≡047^{1} - 3^{1} \equiv 04 mod 100.

Common Pitfalls

  • incorrectly calculating ϕ(n)\phi(n).
  • applying the theorem when a and n are NOT coprime.
  • incorrectly reducing bases.

Practice Problems

StatusSourceProblem NameDifficultyTags
Berkeley Math Circle: Monthly Contest 4Hard
Show TagsFermat / Euler / Wilson theorems, Multiplicative order, φ (Euler's totient)
Berkeley Math Circle Monthly Contest 4Hard
Show TagsCounting two ways, Floors and ceilings, φ (Euler's totient)
Berkeley Math Circle: Monthly Contest 8Hard
Show TagsGreatest common divisors (gcd), Prime numbers, φ (Euler's totient)
2nd Bay Area Mathematical OlympiadHard
Show TagsGreatest common divisors (gcd), Prime numbers, φ (Euler's totient)
USA IMOHard
Show TagsCounting two ways, Inverses mod n, Pigeonhole principle, Prime numbers, φ (Euler's totient)
Harvard-MIT Math TournamentHard
Show TagsFactorization techniques, Greatest common divisors (gcd), Prime numbers, φ (Euler's totient)
Harvard-MIT Math TournamentHard
Show Tagsφ (Euler's totient)
Harvard-MIT Math TournamentHard
Show Tagsφ (Euler's totient)
Harvard-MIT Math TournamentHard
Show TagsFactorization techniques, Prime numbers, φ (Euler's totient)
USA IMOHard
Show TagsConvex hulls, Greatest common divisors (gcd), Vectors, φ (Euler's totient)
10th Annual Harvard-MIT Mathematics TournamentHard
Show TagsFactorization techniques, σ (sum of divisors), τ (number of divisors), φ (Euler's totient)
10th Annual Harvard-MIT Mathematics TournamentHard
Show TagsFactorization techniques, Sums and products, Telescoping series, σ (sum of divisors), φ (Euler's totient)
10th Annual Harvard-MIT Mathematics TournamentHard
Show Tagsφ (Euler's totient)
10th Annual Harvard-MIT Mathematics TournamentHard
Show TagsPrime numbers, σ (sum of divisors), φ (Euler's totient)
Team Selection TestHard
Show TagsChinese remainder theorem, Divisibility / Factorization, Fermat / Euler / Wilson theorems, Multiplicative order, φ (Euler's totient)
10th Annual Harvard-MIT Mathematics TournamentHard
Show Tagsφ (Euler's totient)
10th Annual Harvard-MIT Mathematics TournamentHard
Show TagsMöbius inversion, φ (Euler's totient)
10th Annual Harvard-MIT Mathematics TournamentHard
Show TagsSums and products, σ (sum of divisors), τ (number of divisors), φ (Euler's totient)
10th Annual Harvard-MIT Mathematics TournamentHard
Show TagsInduction / smoothing, Linear and quadratic inequalities, φ (Euler's totient)
Harvard-MIT Mathematics TournamentHard
Show TagsGreatest common divisors (gcd), φ (Euler's totient)
Harvard-MIT Mathematics TournamentHard
Show TagsGreatest common divisors (gcd), φ (Euler's totient)
Harvard-MIT Mathematics TournamentHard
Show TagsGreatest common divisors (gcd), φ (Euler's totient)
Harvard-MIT Mathematics TournamentHard
Show TagsEnumeration with symmetry, Matchings, Marriage Lemma, Tutte's theorem, Recursion, bijection, φ (Euler's totient)
15th Annual Harvard-MIT Mathematics TournamentHard
Show TagsEnumeration with symmetry, Fermat / Euler / Wilson theorems, Permutations / basic group theory, φ (Euler's totient)
15th Annual Harvard-MIT Mathematics TournamentHard
Show TagsMöbius inversion, Sums and products, φ (Euler's totient)

Module Progress:

Join the Discord Community!

Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.