Professional Documents
Culture Documents
Euler’s Theorem
Fermat’s Little Theorem involves moduli which are prime numbers. In this
section, we will learn Euler’s Theorem that will allow us to work with moduli
that are not prime numbers.
To achieve this, Euler introduced the “Euler 𝜑 function” (𝜑 is pronounced
“phee”).
Definition. The function 𝜑 is the function defined by:
𝜑(𝑛) = number of elements in {1,2,…,n} which are relatively prime to n.
How can we compute Euler’s 𝜑 function more efficiently? For 𝜑(5) or 𝜑(12), it
is reasonable to check all integers less than p that are relatively prime to p.
However, we need a more efficient strategy to compute something like
𝜑(250). We will use the following theorem.
Theorem (Computations involving 𝝋(𝒏))
(a) If p is prime and if k is a positive exponent, then
𝜑(𝑝𝑘 ) = 𝑝𝑘 − 𝑝𝑘−1
(b) If m1 and m2 are relatively prime, then
𝜑(𝑚1 𝑚2 ) = 𝜑(𝑚1 )𝜑(𝑚2 )
The proof of this theorem is beyond the scope of this module.
The theorem above gives a way to compute 𝜑(𝑛) more efficiently—first write
n as a product of its prime factors.
Example. Compute the following: (a) 𝜑(81), (b) 𝜑(490), and (c) 𝜑(192)
MathEd 222: Number Theory
15
Solution.
(a) 𝜑(81) = 𝜑(34 ) = 34 − 33 = 81 − 27 = 54
(b) 𝜑(490) = 𝜑(21 51 72 ) = 𝜑(21 )𝜑(51 )𝜑(72 )
= (21 − 20 )(51 − 50 )(72 − 71 )
= (1)(4)(42)
= 168
(b) 𝜑(192) = 𝜑(31 26 ) = 𝜑(31 )𝜑(26 )
= (31 − 30 )(26 − 25 )
= (2)(32)
= 64
Definition
A reduced residue system (mod n) is a set of 𝜑(𝑛) integers such that no two
of them are congruent (mod n).
Example:
a) Consider mod 8. 𝜑(8) = 23 − 22 = 4, so the reduced residue system (mod
8) must contain 4 elements. The set {1,3,5,7} is a reduced residue system
(mod 8) because no pair is congruent mod 8.
b) Consider mod 8 again. The set {17, –1, 71, 43} is also a reduced residue
system (mod 8). There is no pair among these that are congruent mod 8. If we
get their remainders when we divide by 8, then we get the following:
17 8 → Remainder 1
–1 8 → Remainder 5
71 8 → Remainder 7
43 8 → Remainder 3
They all have different remainders, and so the set is a reduced residue
system (mod 8).
We can now multiply the congruences on the right side (above) to obtain the
following:
21 63 105 147 5 7 1 3 (mod 8)
In other words:
(121) (321) (521) (721) 5 7 1 3 (mod 8)
Now we can divide both sides by 5 7 1 3 (which is relatively prime with 8,
so division is valid) to get:
214 1 (mod 8)
We can actually generalize the result above. Starting from any mod (such as
mod 8), if we take its Euler 𝜑-function (in this case 𝜑(8) = 4, then if we make
it an exponent of a base (like 21), then the result is congruent to 1 mod 8. The
only restriction is that the base (21) must be relatively prime to the mod (8).
Example. Use Euler’s Theorem to calculate the following, if possible: (a) 242
(mod 75), (b) 542 (mod 75), and (c) (c) 3101 (mod 56)
Solution.
(a) Euler’s Theorem applies because gcd(2,75) = 1. Therefore,
2𝜑(75) ≡ 1 (mod 75)
We can compute 𝜑(75) using the theorem on page 15:
𝜑(75) = 𝜑(52 ∙ 31 ) = 𝜑(52 )𝜑(31 )
= (52 − 51 )(31 − 30 )
= (20)(2) = 40
Therefore, by Euler’s Theorem, 240 1 (mod 75).
We can now multiply 22 to both sides of the equation to get:
24022 122 (mod 75)
→ 242 4 (mod 75).
(b) We cannot use Euler’s Theorem to calculate 542 (mod 75) because
gcd(5,75) 1.
(c) Euler’s Theorem applies because gcd(3,56) = 1. Therefore,
3𝜑(56) ≡ 1 (mod 56)
We compute 𝜑(56) as follows:
𝜑(56) = 𝜑(23 ∙ 71 ) = 𝜑(23 )𝜑(71 )
= (23 − 22 )(71 − 70 )
= (4)(6) = 24
Therefore, by Euler’s Theorem, 324 ≡ 1 (mod 56)
What about 3101? We use the Division Algorithm to obtain 101 = 4(24)+5
Thus we can write
3101 = 324(4)+5 = (324 )4 35 ≡ (1)4 35 = 243 (mod 56)
MathEd 222: Number Theory
18
Finally, we find the remainder when 243 is divided by 56 to get:
3101 ≡ 243 ≡ 19 (mod 56).
Example. Use Euler’s Theorem to solve the linear congruence 6x ≡ 17 (mod
37).
Solution. We first check that gcd(6,37) = 1 and 1 divides 17, so the equation
has a solution. Further, since gcd(6,37) = 1, then Euler’s Theorem applies.
By Euler’s theorem, 6𝜑(37) ≡ 1 (mod 37). Since 37 is odd, then 𝜑(37) = 36.
Therefore, 636 ≡ 1 (mod 37).
Multiply both sides by 17, and we get: 636 17 ≡ 17 (mod 37).
We can rewrite the equation this way: 6 635 17 ≡ 17 (mod 37).
𝑥
This implies that 𝑥 = 635 17 is a solution to the equation.
Problem Set
Review
On page 15, we learned that if p is prime, then
𝜑(𝑝) = 𝑝 − 1.
Now, in Euler’s Theorem, if n is a prime number p,
then
𝑎𝜑(𝑛) ≡ 1 (mod n)
becomes
𝑎𝑝−1 ≡ 1 (mod p),
which is Fermat’s Little Theorem.
Proof.
Case 1: Suppose a is not divisible by p. Then gcd(a,p) = 1 and we can use
Fermat’s Little Theorem to obtain ap – 1 1 (mod p). We can multiply both
sides by p to get ap a (mod p).
Case 2: Suppose a is divisible by p. Then a 0 (mod p). Raise both sides to
p, to obtain ap 0 (mod p). Since both a and ap are congruent to 0 (mod p),
then ap a (mod p).
Example. Compute 5496 (mod 97).
Solution. The number 97 is prime. Also, gcd(54, 97) = 1. Therefore, 54 96 1
(mod 97).
Problem Set
In each of the following, use Fermat’s Little Theorem to fill in the blanks with
the least non-negative residue.
1. 144 _____ (mod 5) [1]
2. 20013 _____ (mod 13) [5]
3. 315 _____ (mod 7) [Hint: What is 35 (mod 6)?] [6]
4. 522 _____ (mod 19) [17]
5. 3144 _____ (mod 17) [1]
6. 56147 _____ (mod 13) [12]