Number Theory 1
Number Theory 1
Number Theory
1. Divisibility
The Division Algorithm
Divisibility
Greatest Common Divisor
Euclidean Algorithm
Least Common Multiples
Bezout’s Identity
Linear Diophantine Equations
Application of Linear Diophantine Equations
Outline
2. Prime Numbers
The Fundamental Theorem of Arithmetic
3. Congruences
Basic Properties of Congruence
Special Divisibility Tests
Linear Congruences
Chinese Remainder Theorem
Outline
4. Congruences with a Prime-power Modulus
The Arithmetic of Zp
Pseudoprimes and Carmichael Numbers
Solving Congruences mod (pe )
5. Euler’s Function
Units
Euler’s Function
Applications of Euler’s Function
6. Bibliography
Chapter I
Divisibility
The Division Algorithm
Theorem 1.1
The Division Algorithm
Given a, b ∈ Z with b > 0, ∃ unique q, r ∈ Z satisfying
a = qb + r 0≤r<b
The integers q and r are called, respectively, the quotient and re-
mainder in the division of a by b.
Example 1.1
Identify the values of q and r if
a = 9 and b = 2
Example 1.1
Identify the values of q and r if
a = 9 and b = 2
Answer
q = 4 and r = 1
Example 1.2
Identify the values of q and r if
a = 1, 397 and b = 37
Example 1.2
Identify the values of q and r if
a = 1, 397 and b = 37
Answer
q = 37 and r = 28
Example 1.3
Identify the values of q and r if
where x ∈ Z
Example 1.3
Identify the values of q and r if
where x ∈ Z
Answer
q = x2 − 5x + 3 and r = 4
Example 1.4
Identify the values of q and r if
where x ∈ Z
Example 1.4
Identify the values of q and r if
where x ∈ Z
Answer
Answer
b = ac
36 and 42
Example 1.6
Identify the GCD of the following numbers
36 and 42
Answer
gcd(36, 42) = 6
Example 1.7
Identify the GCD of the following numbers
−12 and 30
Example 1.7
Identify the GCD of the following numbers
−12 and 30
Answer
gcd(−12, 30) = 6
Example 1.8
Identify the GCD of the following numbers
−5 and 5
Example 1.8
Identify the GCD of the following numbers
−5 and 5
Answer
gcd(−5, 5) = 5
Example 1.9
Identify the GCD of the following numbers
8 and 17
Example 1.9
Identify the GCD of the following numbers
8 and 17
Answer
gcd(8, 17) = 1
Example 1.10
Identify the GCD of the following numbers
−8 and −36
Example 1.10
Identify the GCD of the following numbers
−8 and −36
Answer
gcd(−8, −36) = 4
Euclidean Algorithm
Definition
Euclidean Algorithm is a way to find the greatest common divisor
of a, b ∈ Z+ .
Process:
Input: Two positive integers, a and b
Output: gcd(a, b)
Algorithm:
I If a < b, exchange a and b
ous step.
Example 1.11
Using the Euclidean Algorithm, identify the GCD of the following
numbers
36 and 42
Example 1.11
Using the Euclidean Algorithm, identify the GCD of the following
numbers
36 and 42
Answer
gcd(36, 42) = 6
Example 1.12
Using the Euclidean Algorithm, identify the GCD of the following
numbers
Answer
gcd(143, 227) = 1
Example 1.13
Using the Euclidean Algorithm, identify the GCD of the following
numbers
Answer
gcd(306, 657) = 9
Example 1.14
Using the Euclidean Algorithm, identify the GCD of the following
numbers
Answer
gcd(272, 1479) = 17
Example 1.15
Using the Euclidean Algorithm, identify the GCD of the following
numbers
Answer
gcd(12378, 3054) = 6
Least Common Multiples
Definition
The least common multiple of a, b ∈ Z\{0}, denoted by lcm(a, b),
is m ∈ Z+ satisfying
I a|m and b|m; and
56 and 75
Example 1.16
Identify the LCM of the following numbers
56 and 75
Answer
24 and 138
Example 1.17
Identify the LCM of the following numbers
24 and 138
Answer
Answer
Answer
Answer
gcd(a, b) = ax + by
Definition
The Extended Euclidean Algorithm is an algorithm that computes
x, y ∈ Z such that
gcd(a, b) = ax + by
Answer
x=4 ; y = −3
Example 1.22
Use the Euclidean Algorithm to obtain x, y ∈ Z satisfying
Answer
x=6 ; y = −1
Example 1.23
Use the Euclidean Algorithm to obtain x, y ∈ Z satisfying
Answer
x=7 ; y = −3
Example 1.24
Use the Euclidean Algorithm to obtain x, y ∈ Z satisfying
Answer
x = 39 ; y = −29
Example 1.25
Use the Euclidean Algorithm to obtain x, y ∈ Z satisfying
Answer
x = −65 ; y = 1386
Linear Diophantine Equations
Definition
A Diophantine equation is an equation in which only integer solu-
tions are allowed.
Theorem 1.5
The Linear Diophantine Equation ax + by = c has a solution if
and only if d|c, where d = gcd(a, b) If x0 and y0 is any particular
solution of this equation, then all other solutions are given by
bt at
x = x0 + and y = y0 −
d d
such that t ∈ Z
Example 1.26
Determine all the solutions in the integers of the following Diophan-
tine Equations:
Answer
Answer
Answer
Answer
123x + 360y = 99
Example 1.30
Determine all the solutions in the positive integers of the following
Diophantine Equations:
123x + 360y = 99
Answer
Answer
Answer
Answer
Therefore, if Travis spends all his money, there are 3 ways he could
purchase beverages for the party.
Example 1.34
Clara wants to buy pizza and cola to her family. She has 400 php.
If we know that each pizza 57 php and each bottle of cola cost 22
php, how many pizzas and bottles of cola she can buy?
Example 1.34
Clara wants to buy pizza and cola to her family. She has 400 php.
If we know that each pizza 57 php and each bottle of cola cost 22
php, how many pizzas and bottles of cola she can buy?
Answer
p | a or p | b
Corollary 1
If p is a prime and p | a1 · a2 · ... · an , then
p | ak
p = qk
360
Example 2.1
Express the given number in its canonical form
360
Answer
23 · 32 · 5
Example 2.2
Express the given number in its canonical form
4725
Example 2.2
Express the given number in its canonical form
4725
Answer
33 · 52 · 7
Example 2.3
Express the given number in its canonical form
17460
Example 2.3
Express the given number in its canonical form
17460
Answer
23 · 32 · 5 · 72
Example 2.4
Express the given number in its canonical form
2093
Example 2.4
Express the given number in its canonical form
2093
Answer
7 · 13 · 23
Example 2.5
Express the given number in its canonical form
3528
Example 2.5
Express the given number in its canonical form
3528
Answer
23 · 32 · 72
Chapter III
Congruences
What day of the week will it be 100 days from now?
Basic Properties of Congruence
Definition
Let n be a fixed positive integer. Two integers a and b are said to
be congruent modulo n, symbolized by
a ≡ b (mod n)
a ≡ b (mod n)
29 ≡ 8 (mod 7)
Example 3.1
29 ≡ 8 (mod 7)
Example 3.2
60 ≡ 0 (mod 15)
Example 3.3
15 ≡ 3 (mod 4)
Example 3.3
15 ≡ 3 (mod 4)
Example 3.4
10 ≡ 15 (mod 5)
Example 3.5
Consider n = 3, that is Z3 :
(mod n)
I If a ≡ b (mod n), then ak ≡ bk (mod n) for any k ∈ Z+
Example 3.6
Show that
41 divides 220 − 1
Example 3.7
Show that
89 divides 244 − 1
Example 3.8
Show that
97 divides 248 − 1
Example 3.9
If divided by 12, what is the remainder of
Answer
The remainder is 9.
Example 3.10
If divided by 7, what is the remainder of
250
Example 3.10
If divided by 7, what is the remainder of
250
Answer
The remainder is 4.
Example 3.11
If divided by 7, what is the remainder of
4165
Example 3.11
If divided by 7, what is the remainder of
4165
Answer
The remainder is 6.
Example 3.12
Find the value of k such that k ∈ Z and 0 ≤ k ≤ 11 if
Answer
k=1
Example 3.13
Find the value of k such that k ∈ Z and 0 ≤ k ≤ 6 if
250 ≡ k (mod 7)
Example 3.13
Find the value of k such that k ∈ Z and 0 ≤ k ≤ 6 if
250 ≡ k (mod 7)
Answer
k=4
Example 3.14
Find the value of k such that k ∈ Z and 0 ≤ k ≤ 11 if
Answer
k=3
Example 3.15
ax ≡ b (mod n)
has a solution if and only if d|b, where d = gcd(a, n). If d|b, then it
has d mutually incongruent solutions modulo n.
Example 3.19
Solve for the general solution of the linear congruence
Answer
x = −10 + 7t
Example 3.20
Solve for the general solution of the linear congruence
9x ≡ 21 (mod 30)
Example 3.20
Solve for the general solution of the linear congruence
9x ≡ 21 (mod 30)
Answer
x = −21 + 10t
Example 3.21
Solve for the general solution of the linear congruence
Answer
No solution.
Example 3.22
Solve for the general solution of the linear congruence
7x ≡ 3 (mod 12)
Example 3.22
Solve for the general solution of the linear congruence
7x ≡ 3 (mod 12)
Answer
x = −15 + 12t
Example 3.23
Solve for the general solution of the linear congruence
Answer
x = 9 + 7t
Extension of Theorem 3.3
If x0 is any solution of ax ≡ b (mod n), then d = gcd(a, n) incon-
gruent solutions are given by the sequence
n 2n (d − 1)n
{ad } = x0 , x0 + , x0 + , ... , x0 +
d d d
which can be written as
x ≡ ad (mod n)
ax ≡ b (mod n)
7x ≡ 3 (mod 12)
7x ≡ 3 (mod 12)
Answer
x ≡ 9 (mod 12)
Example 3.25
Identify the incongruent solution(s) modulo n of
9x ≡ 21 (mod 30)
9x ≡ 21 (mod 30)
Answer