Académique Documents
Professionnel Documents
Culture Documents
Euler’s, Fermat’s
and
Wilson’s Theorems
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Example
Find the least positive residue when 3500 is divided by 13.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Example
Find the least positive residue when 3500 is divided by 13.
Solutions:
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Example
Find the least positive residue when 3500 is divided by 13.
Solutions: In solving this problem,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Example
Find the least positive residue when 3500 is divided by 13.
Solutions: In solving this problem, it is just like solving for n
in the linear congruence 3500 ≡ n (mod 13).
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Example
Find the least positive residue when 3500 is divided by 13.
Solutions: In solving this problem, it is just like solving for n
in the linear congruence 3500 ≡ n (mod 13).
Since 33 ≡ 1 (mod 13),
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Example
Find the least positive residue when 3500 is divided by 13.
Solutions: In solving this problem, it is just like solving for n
in the linear congruence 3500 ≡ n (mod 13).
Since 33 ≡ 1 (mod 13), then we have
3500
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Example
Find the least positive residue when 3500 is divided by 13.
Solutions: In solving this problem, it is just like solving for n
in the linear congruence 3500 ≡ n (mod 13).
Since 33 ≡ 1 (mod 13), then we have
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Example
Find the least positive residue when 3500 is divided by 13.
Solutions: In solving this problem, it is just like solving for n
in the linear congruence 3500 ≡ n (mod 13).
Since 33 ≡ 1 (mod 13), then we have
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Example
Find the least positive residue when 3500 is divided by 13.
Solutions: In solving this problem, it is just like solving for n
in the linear congruence 3500 ≡ n (mod 13).
Since 33 ≡ 1 (mod 13), then we have
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Example
Find the least positive residue when 3500 is divided by 13.
Solutions: In solving this problem, it is just like solving for n
in the linear congruence 3500 ≡ n (mod 13).
Since 33 ≡ 1 (mod 13), then we have
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
DEFINITION
Definition:
If m is a natural number and b is an integer, let b = qm + r,
where 0 ≤ r ≤ m − 1. We say that r is the least positive residue
of b (mod m).
Example
Find the least positive residue when 3500 is divided by 13.
Solutions: In solving this problem, it is just like solving for n
in the linear congruence 3500 ≡ n (mod 13).
Since 33 ≡ 1 (mod 13), then we have
Example
Find the least positive residue of 12! modulo 13.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
EXAMPLE
Example
Find the least positive residue of 12! modulo 13.
Solutions:
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
EXAMPLE
Example
Find the least positive residue of 12! modulo 13.
Solutions:
Its another way of saying that,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
EXAMPLE
Example
Find the least positive residue of 12! modulo 13.
Solutions:
Its another way of saying that, what is the remainder when
12! is divided by 13?
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
EXAMPLE
Example
Find the least positive residue of 12! modulo 13.
Solutions:
Its another way of saying that, what is the remainder when
12! is divided by 13? Now
12!
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
EXAMPLE
Example
Find the least positive residue of 12! modulo 13.
Solutions:
Its another way of saying that, what is the remainder when
12! is divided by 13? Now
12! = 12 · 11 · 10 · 9 · (8 · 7) · (6 · 5) · (4 · 3) · 2 · 1
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
EXAMPLE
Example
Find the least positive residue of 12! modulo 13.
Solutions:
Its another way of saying that, what is the remainder when
12! is divided by 13? Now
12! = 12 · 11 · 10 · 9 · (8 · 7) · (6 · 5) · (4 · 3) · 2 · 1
≡ (−1)(−2)[(−3)(−4)](4)(4)(−1)(2)(mod 13)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
EXAMPLE
Example
Find the least positive residue of 12! modulo 13.
Solutions:
Its another way of saying that, what is the remainder when
12! is divided by 13? Now
12! = 12 · 11 · 10 · 9 · (8 · 7) · (6 · 5) · (4 · 3) · 2 · 1
≡ (−1)(−2)[(−3)(−4)](4)(4)(−1)(2)(mod 13)
≡ (2)(−1)(6)(−1)(mod 13)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Least Positive Residue
EXAMPLE
Example
Find the least positive residue of 12! modulo 13.
Solutions:
Its another way of saying that, what is the remainder when
12! is divided by 13? Now
12! = 12 · 11 · 10 · 9 · (8 · 7) · (6 · 5) · (4 · 3) · 2 · 1
≡ (−1)(−2)[(−3)(−4)](4)(4)(−1)(2)(mod 13)
≡ (2)(−1)(6)(−1)(mod 13)
≡ 12(mod 13)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
x ≡ a1 (mod m1 )
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
x ≡ a1 (mod m1 )
x ≡ a2 (mod m2 )
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
x ≡ a1 (mod m1 )
x ≡ a2 (mod m2 )
x ≡ a3 (mod m3 )
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
x ≡ a1 (mod m1 )
x ≡ a2 (mod m2 )
x ≡ a3 (mod m3 )
..
.
x ≡ ar (mod mr )
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
x ≡ a1 (mod m1 )
x ≡ a2 (mod m2 )
x ≡ a3 (mod m3 )
..
.
x ≡ ar (mod mr )
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
x ≡ a1 (mod m1 )
x ≡ a2 (mod m2 )
x ≡ a3 (mod m3 )
..
.
x ≡ ar (mod mr )
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
x ≡ a1 (mod m1 )
x ≡ a2 (mod m2 )
x ≡ a3 (mod m3 )
..
.
x ≡ ar (mod mr )
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
System of Linear Congruences
CHINESE REMAINDER THEOREM
x ≡ a1 (mod m1 )
x ≡ a2 (mod m2 )
x ≡ a3 (mod m3 )
..
.
x ≡ ar (mod mr )
x ≡ a1 (mod m1 )
x ≡ a2 (mod m2 )
x ≡ a3 (mod m3 )
..
.
x ≡ ar (mod mr )
Example
Find a number that leaves a remainder of 1 when divided
by 3,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5 and a reminder of 3
when divided by 7.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5 and a reminder of 3
when divided by 7.
Solutions:
This problem leads us to the system of linear congruences
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5 and a reminder of 3
when divided by 7.
Solutions:
This problem leads us to the system of linear congruences
x ≡ 1(mod 3)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5 and a reminder of 3
when divided by 7.
Solutions:
This problem leads us to the system of linear congruences
x ≡ 1(mod 3)
x ≡ 2(mod 5)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5 and a reminder of 3
when divided by 7.
Solutions:
This problem leads us to the system of linear congruences
x ≡ 1(mod 3)
x ≡ 2(mod 5)
x ≡ 3(mod 7)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5 and a reminder of 3
when divided by 7.
Solutions:
This problem leads us to the system of linear congruences
x ≡ 1(mod 3)
x ≡ 2(mod 5)
x ≡ 3(mod 7)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5 and a reminder of 3
when divided by 7.
Solutions:
This problem leads us to the system of linear congruences
x ≡ 1(mod 3)
x ≡ 2(mod 5)
x ≡ 3(mod 7)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5 and a reminder of 3
when divided by 7.
Solutions:
This problem leads us to the system of linear congruences
x ≡ 1(mod 3)
x ≡ 2(mod 5)
x ≡ 3(mod 7)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5 and a reminder of 3
when divided by 7.
Solutions:
This problem leads us to the system of linear congruences
x ≡ 1(mod 3)
x ≡ 2(mod 5)
x ≡ 3(mod 7)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5 and a reminder of 3
when divided by 7.
Solutions:
This problem leads us to the system of linear congruences
x ≡ 1(mod 3)
x ≡ 2(mod 5)
x ≡ 3(mod 7)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Example
Find a number that leaves a remainder of 1 when divided
by 3, a remainder of 2 when divided by 5 and a reminder of 3
when divided by 7.
Solutions:
This problem leads us to the system of linear congruences
x ≡ 1(mod 3)
x ≡ 2(mod 5)
x ≡ 3(mod 7)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
M2 x2 ≡ 1(mod 5)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
M3 x3 ≡ 1(mod 7)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
x ≡ (1)(35)(2)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
x ≡ (1)(35)(2) + (2)(21)(1)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Chinese Remainder Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Let m ∈ N.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
One can verify that φ(1) = 1,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
One can verify that φ(1) = 1, φ(2) = 1,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
One can verify that φ(1) = 1, φ(2) = 1, φ(3) = 2,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
One can verify that φ(1) = 1, φ(2) = 1, φ(3) = 2, φ(4) = 2,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
One can verify that φ(1) = 1, φ(2) = 1, φ(3) = 2, φ(4) = 2,
φ(4) = 4,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
One can verify that φ(1) = 1, φ(2) = 1, φ(3) = 2, φ(4) = 2,
φ(4) = 4, φ(6) = 2,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
One can verify that φ(1) = 1, φ(2) = 1, φ(3) = 2, φ(4) = 2,
φ(4) = 4, φ(6) = 2, φ(7) = 6,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
One can verify that φ(1) = 1, φ(2) = 1, φ(3) = 2, φ(4) = 2,
φ(4) = 4, φ(6) = 2, φ(7) = 6, φ(8) = 4,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
One can verify that φ(1) = 1, φ(2) = 1, φ(3) = 2, φ(4) = 2,
φ(4) = 4, φ(6) = 2, φ(7) = 6, φ(8) = 4, φ(9) = 6,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
One can verify that φ(1) = 1, φ(2) = 1, φ(3) = 2, φ(4) = 2,
φ(4) = 4, φ(6) = 2, φ(7) = 6, φ(8) = 4, φ(9) = 6, φ(10) = 4,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Euler’s Phi Function
DEFINITION
Example
Consider m = 12. The integers 1, 5, 7 and 11 are the only
four positive integers less than or equal to 12 that are relatively
to 12. Thus φ(12) = 4.
One can verify that φ(1) = 1, φ(2) = 1, φ(3) = 2, φ(4) = 2,
φ(4) = 4, φ(6) = 2, φ(7) = 6, φ(8) = 4, φ(9) = 6, φ(10) = 4, and
φ(11) = 10.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Example
What is the remainder when 1698 is divided by 21?
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Example
What is the remainder when 1698 is divided by 21?
Solutions:
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Example
What is the remainder when 1698 is divided by 21?
Solutions:
Since φ(21) = 12
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Example
What is the remainder when 1698 is divided by 21?
Solutions:
Since φ(21) = 12 and gcd(16, 21) = 1,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Example
What is the remainder when 1698 is divided by 21?
Solutions:
Since φ(21) = 12 and gcd(16, 21) = 1, by Euler’s theorem,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Example
What is the remainder when 1698 is divided by 21?
Solutions:
Since φ(21) = 12 and gcd(16, 21) = 1, by Euler’s theorem,
we have 1612 ≡ 1(mod 21).
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Example
What is the remainder when 1698 is divided by 21?
Solutions:
Since φ(21) = 12 and gcd(16, 21) = 1, by Euler’s theorem,
we have 1612 ≡ 1(mod 21). Thus,
1698
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Example
What is the remainder when 1698 is divided by 21?
Solutions:
Since φ(21) = 12 and gcd(16, 21) = 1, by Euler’s theorem,
we have 1612 ≡ 1(mod 21). Thus,
1698 = (1612 )8 · 162
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Example
What is the remainder when 1698 is divided by 21?
Solutions:
Since φ(21) = 12 and gcd(16, 21) = 1, by Euler’s theorem,
we have 1612 ≡ 1(mod 21). Thus,
1698 = (1612 )8 · 162 ≡ 1 · 256
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Example
What is the remainder when 1698 is divided by 21?
Solutions:
Since φ(21) = 12 and gcd(16, 21) = 1, by Euler’s theorem,
we have 1612 ≡ 1(mod 21). Thus,
1698 = (1612 )8 · 162 ≡ 1 · 256 ≡ 4(mod 21)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EULER’S THEOREM
Example
What is the remainder when 1698 is divided by 21?
Solutions:
Since φ(21) = 12 and gcd(16, 21) = 1, by Euler’s theorem,
we have 1612 ≡ 1(mod 21). Thus,
1698 = (1612 )8 · 162 ≡ 1 · 256 ≡ 4(mod 21)
Hence, the remainder is 4 when 1698 is divided by 21.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Corollary:
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Corollary:
Let p be prime and a ∈ Z.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Corollary:
Let p be prime and a ∈ Z. Then ap ≡ a(mod p).
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
FERMAT’S LITTLE THEOREM
Corollary:
Let p be prime and a ∈ Z. Then ap ≡ a(mod p).
Example
What is the remainder when 101370 is divided by 37?
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Solutions:
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Solutions:
Note that 101370 = (1036 )38 · 102
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Solutions:
Note that 101370 = (1036 )38 · 102 and, by Fermat’s Little
Theorem,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Solutions:
Note that 101370 = (1036 )38 · 102 and, by Fermat’s Little
Theorem, 1036 ≡ 1(mod 37)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Solutions:
Note that 101370 = (1036 )38 · 102 and, by Fermat’s Little
Theorem, 1036 ≡ 1(mod 37) since (10, 37) = 1.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Solutions:
Note that 101370 = (1036 )38 · 102 and, by Fermat’s Little
Theorem, 1036 ≡ 1(mod 37) since (10, 37) = 1. Thus, we have
101370
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Solutions:
Note that 101370 = (1036 )38 · 102 and, by Fermat’s Little
Theorem, 1036 ≡ 1(mod 37) since (10, 37) = 1. Thus, we have
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Solutions:
Note that 101370 = (1036 )38 · 102 and, by Fermat’s Little
Theorem, 1036 ≡ 1(mod 37) since (10, 37) = 1. Thus, we have
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Solutions:
Note that 101370 = (1036 )38 · 102 and, by Fermat’s Little
Theorem, 1036 ≡ 1(mod 37) since (10, 37) = 1. Thus, we have
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Solutions:
Note that 101370 = (1036 )38 · 102 and, by Fermat’s Little
Theorem, 1036 ≡ 1(mod 37) since (10, 37) = 1. Thus, we have
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n).
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n).
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above, n5 ≡ n(mod 5),
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above, n5 ≡ n(mod 5), that is, 5 | (n5 − n).
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above, n5 ≡ n(mod 5), that is, 5 | (n5 − n). Thus, we
are left to show that 2 | (n5 − n).
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above, n5 ≡ n(mod 5), that is, 5 | (n5 − n). Thus, we
are left to show that 2 | (n5 − n).
Note that n5 − n = n(n2 − 1)(n2 + 1)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above, n5 ≡ n(mod 5), that is, 5 | (n5 − n). Thus, we
are left to show that 2 | (n5 − n).
Note that n5 − n = n(n2 − 1)(n2 + 1)
If n is even,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above, n5 ≡ n(mod 5), that is, 5 | (n5 − n). Thus, we
are left to show that 2 | (n5 − n).
Note that n5 − n = n(n2 − 1)(n2 + 1)
If n is even, then n5 − n is also even,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above, n5 ≡ n(mod 5), that is, 5 | (n5 − n). Thus, we
are left to show that 2 | (n5 − n).
Note that n5 − n = n(n2 − 1)(n2 + 1)
If n is even, then n5 − n is also even, thus 2 | (n5 − n).
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above, n5 ≡ n(mod 5), that is, 5 | (n5 − n). Thus, we
are left to show that 2 | (n5 − n).
Note that n5 − n = n(n2 − 1)(n2 + 1)
If n is even, then n5 − n is also even, thus 2 | (n5 − n).
If n is odd,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above, n5 ≡ n(mod 5), that is, 5 | (n5 − n). Thus, we
are left to show that 2 | (n5 − n).
Note that n5 − n = n(n2 − 1)(n2 + 1)
If n is even, then n5 − n is also even, thus 2 | (n5 − n).
If n is odd, then both (n2 − 1) and (n2 + 1) are even,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above, n5 ≡ n(mod 5), that is, 5 | (n5 − n). Thus, we
are left to show that 2 | (n5 − n).
Note that n5 − n = n(n2 − 1)(n2 + 1)
If n is even, then n5 − n is also even, thus 2 | (n5 − n).
If n is odd, then both (n2 − 1) and (n2 + 1) are even, and so
n5 − n is even.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Fermat’s Little Theorem
EXAMPLE
Example
For any n ∈ N, show that n5 and n always have the same
units digit.
Solutions:
We prove the assertion by showing that 10 | (n5 − n). That
is, we will show that 5 | (n5 − n) and 2 | (n5 − n). By the
Corollary above, n5 ≡ n(mod 5), that is, 5 | (n5 − n). Thus, we
are left to show that 2 | (n5 − n).
Note that n5 − n = n(n2 − 1)(n2 + 1)
If n is even, then n5 − n is also even, thus 2 | (n5 − n).
If n is odd, then both (n2 − 1) and (n2 + 1) are even, and so
n5 − n is even. Hence, 2 | (n5 − n).
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
That is, we are going to solve for n in the congruence
90! ≡ n(mod 97).
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
That is, we are going to solve for n in the congruence
90! ≡ n(mod 97). By Wilson’s theorem,
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
That is, we are going to solve for n in the congruence
90! ≡ n(mod 97). By Wilson’s theorem, 96! ≡ −1(mod 97),
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
That is, we are going to solve for n in the congruence
90! ≡ n(mod 97). By Wilson’s theorem, 96! ≡ −1(mod 97), thus
96 · 95 · 94 · 93 · 92 · 91 · 90!
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
That is, we are going to solve for n in the congruence
90! ≡ n(mod 97). By Wilson’s theorem, 96! ≡ −1(mod 97), thus
96 · 95 · 94 · 93 · 92 · 91 · 90! ≡ −1(mod 97)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
That is, we are going to solve for n in the congruence
90! ≡ n(mod 97). By Wilson’s theorem, 96! ≡ −1(mod 97), thus
96 · 95 · 94 · 93 · 92 · 91 · 90! ≡ −1(mod 97)
(−1)(−2)(−3)(−4)(−5)(−6) · 90!
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
That is, we are going to solve for n in the congruence
90! ≡ n(mod 97). By Wilson’s theorem, 96! ≡ −1(mod 97), thus
96 · 95 · 94 · 93 · 92 · 91 · 90! ≡ −1(mod 97)
(−1)(−2)(−3)(−4)(−5)(−6) · 90! ≡ −1(mod 97)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
That is, we are going to solve for n in the congruence
90! ≡ n(mod 97). By Wilson’s theorem, 96! ≡ −1(mod 97), thus
96 · 95 · 94 · 93 · 92 · 91 · 90! ≡ −1(mod 97)
(−1)(−2)(−3)(−4)(−5)(−6) · 90! ≡ −1(mod 97)
720 · 90!
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
That is, we are going to solve for n in the congruence
90! ≡ n(mod 97). By Wilson’s theorem, 96! ≡ −1(mod 97), thus
96 · 95 · 94 · 93 · 92 · 91 · 90! ≡ −1(mod 97)
(−1)(−2)(−3)(−4)(−5)(−6) · 90! ≡ −1(mod 97)
720 · 90! ≡ −1(mod 97)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
That is, we are going to solve for n in the congruence
90! ≡ n(mod 97). By Wilson’s theorem, 96! ≡ −1(mod 97), thus
96 · 95 · 94 · 93 · 92 · 91 · 90! ≡ −1(mod 97)
(−1)(−2)(−3)(−4)(−5)(−6) · 90! ≡ −1(mod 97)
720 · 90! ≡ −1(mod 97)
41 · 90!
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
WILSON’S THEOREM
Example
Find the remainder when 90! is divided by 97.
Solutions:
That is, we are going to solve for n in the congruence
90! ≡ n(mod 97). By Wilson’s theorem, 96! ≡ −1(mod 97), thus
96 · 95 · 94 · 93 · 92 · 91 · 90! ≡ −1(mod 97)
(−1)(−2)(−3)(−4)(−5)(−6) · 90! ≡ −1(mod 97)
720 · 90! ≡ −1(mod 97)
41 · 90! ≡ −1(mod 97)
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Wilson’s Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Wilson’s Theorem
EXAMPLE
71 · 41 · 90!
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Wilson’s Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Wilson’s Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Wilson’s Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Wilson’s Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Wilson’s Theorem
EXAMPLE
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The
Congruences
EXERCISES
EXERCISES:
1 Find the remainder when
13 · 1245 is divided by 47
252 is divided by 37
9! is divided by 11
2 Find the least positive residue when 18! is divided by 437.
3 Show that 55552222 + 22225555 is divisible by 7.
x5 x3 7x
4 Show that if x is an integer, then + + is also an
5 3 15
integer.
5 Find a multiple of 11 that leaves a remainder of 1 when
divided by each of the integers 2, 3, 5 and 7.
82!
6 Let y = . What is the remainder when y is divided by
21
83?
Math 125 - Number Theory Oreste M. Ortega, Jr. Leyte Normal University
Chinese Remainder Theorem, Euler’s, Fermat’s and Wilson’s The