Professional Documents
Culture Documents
Fermats and Wilsons Theorem
Fermats and Wilsons Theorem
Fermats and Wilsons Theorem
Number Theory
Introduction
In this lesson we present three applications of congruences. The first theorem is
Euler’s theorem which is a generalization of Fermat’s theorem and it states that for any
positive integer 𝑚 that is relatively prime to an integer 𝑎, 𝑎𝜙(𝑚) ≡ 1 (mod m) where
𝜙 is the Euler’s 𝜙-function. Next, we present Wilson’s theorem which states that
(𝑝 − 1)! Is divisible by 𝑝 for 𝑝 prime. Finally, we present Fermat’s theorem, also
known as Fermat’s little theorem which states that 𝑎𝑝 and 𝑎 have the same tremainders
when divided by 𝑝 where 𝑝 ∤ 𝑎.
Learning Outcomes
At the end of the lesson, you are expected to:
• Apply knowledge of Euler’s theorem, Wilson’s theorem and Fermat’s theorem
to solve congruences.
Learning Activities
Determine the remainder of the following integers. Write your answer on a separate
sheet of paper.
1. 15│126
2. 21│623
3. 17│135
4. 33│989
5. 26│467
Analysis
1. How did you determine the remainder of the integers? (State your process).
_________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
2. What operations did you use to find all factors of the integers?
_________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
80
SP MATH 120
Number Theory
_________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Abstraction
According to (Ortega) we can use the following definitions, properties and theorems to
solve congruences.
Least Positive Residue
Example
Solutions: In solving this problem, it is just like solving for 𝑛 in the linear congruence
4750 ≡ 𝑛 (mod 17).
Example
Solutions
≡ 1 ∙ 9 (mod 11)
81
SP MATH 120
Number Theory
Try me!
Apply definition discussed above to find the least positive residue of the following
integers. Write your answer on a separate sheet of paper.
𝑎𝜙(𝑚) ≡ 1(mod 𝑚)
Example
What is the remainder when 32147 is divided by 27?
Solutions
Since 𝜙 (27) = 1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26 then
𝜙(27) ≡ 18 and 𝑔𝑐𝑑(32, 27) ≡ 1, by Euler’s theorem, we have 3218 ≡ 1(mod 27).
Thus,
32147 ≡ (3218 )8 ∙ 323 (mod 27) Factor exponential function by the 𝜙 (27)
≡ (18 ) ∙ 323 (mod 27) Apply Euler’s theorem
≡ 1 ∙ 32768(mod 27) Simplify 18 using mod 27
32147 ≡ 17(mod 27) Solution
So, the remainder is 17 when 32147 is divided by 27.
Example
What is the remainder when 1747 is divided by 12?
Solution
Since 𝜙 (12) = 1, 5, 7, 11 then 𝜙 (27) = 4 and 𝑔𝑐𝑑(17, 12) = 1, by Euler’s
theorem, we have 174 = 1(mod 12). Thus,
1747 ≡ (174 )11 ∙ 173 (mod 12)
≡ 111 ∙ 173 (mod 12)
≡ 1 ∙ 4913 (mod 12)
1747 ≡ 5 (mod 12)
So, the remainder is 5 when 1747 is divided by 12.
82
SP MATH 120
Number Theory
Try me!
Apply Euler’s theorem to solve the following congruences. Write your answer on a
separate sheet of paper.
1. What is the remainder when 25247 is divided by 36?
2. What is the remainder when 19125 is divided by 23?
83
SP MATH 120
Number Theory
84
SP MATH 120
Number Theory
85
SP MATH 120
Number Theory
_________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Application
Apply the different definitions, and theorems to solve and following linear
congruences. Write your answer on a separate sheet.
1. What is the remainder when 2761 is divide by 61?
2. What is the remainder when 27354 is divide by 18?
3. Find the remainder when 99! is divided by 107.
Assessment
Apply knowledge of Euler’s theorem, Wilson’s theorem and Fermat’s theorem to solve
congruences. Write your answer on a separate sheet of paper.
86
SP MATH 120
Number Theory
87