Number Theory Modules
Number Theory Modules
Session 6
Divisibility of integers is the most important idea in the theory of number. The term “divide”
will be used in place of language of divisibility. We shall have a number of occasions to use this
technical term and see its significance in the light of several basic concepts.
Definition: Divisibility
If a and b are integers with 𝑎 ≠ 0, we say that a divides b if there is an integer 𝑞 ∈ ℤ such that
𝑏 = 𝑎𝑞. If a divides b, we say also that a is a divisor or factor of b.
If a divides b, we write 𝑎|𝑏. If a does not divide b, we write 𝑎|𝑏. This indicates that there exists
integers q and r such that 𝑏 = 𝑎𝑞 + 𝑟 where 0 < 𝑟 < |𝑎|.
Examples:
1. 4|24 since 24 = 4(6)
2. 3|25 since 25 = 3(__) + __
3. 5|125 since __ = __ (__)
The following are equivalent statements and “may be” used interchangeably,
𝑏 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 𝑎
𝑎 𝑑𝑖𝑣𝑖𝑑𝑒𝑠 𝑏
𝑎|𝑏 = { 𝑏 𝑖𝑠 𝑎 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑒 𝑜𝑓 𝑎
𝑎 𝑖𝑠 𝑎 𝑑𝑖𝑣𝑖𝑠𝑜𝑟 𝑜𝑟 𝑓𝑎𝑐𝑡𝑜𝑟 𝑜𝑓 𝑏
Note that the symbol 𝑎|𝑏 is different from the fraction symbol a/b or 𝑎 ÷ 𝑏. It is also different
from b/a because 𝑎|𝑏 is either true or false, while b/a is a rational number.
Examples:
1. TRUE OR FALSE
5|30 ________________
2|26 ________________
−3|49 ________________
0|50 ________________
19|1 ________________
1|35 ________________
3. Are there integers a, b and c s.t. 𝑎|𝑏𝑐, but a does not divide b and a does not divide c?
1. 𝑎|0
4. If 𝑎|1, the 𝑎 = 1 or 𝑎 = −1
9. (Linear Property) If 𝑎|𝑏 and 𝑎|𝑐, then 𝑎|(𝑏𝑥 + 𝑐𝑦) for all integers x and y.
Examples:
Prove the following statements for all non-zero integers a, b, andc.
Example 1. What are q and r if b = 75 and a = 24? If b = 75 and 𝑎 = 25? If b = 82 and 𝑎 = −14?
The Division Algorithm provides a variety of interesting applications in number theory. For
example, when an integer b is divided by 𝑎 = 2, the possible remainders are only r = 0 and 1. This
means that when
r = 0, b is even and may be expressed as b = 2q, and when
r = 1, b is odd and may be expressed as b = 2q + 1 for some integers q.
Also, we may remark that any integer b can be expressed in any of the forms b = 3q, 3q + 1,
or 3q + 2. In short, b = 3q + r, where 0 ≤ 𝑟 < 3.
Example 2. Show that the square of every odd integer is of the form 8q + 1.
Solution. Let n be an odd integer. An appropriate form of n should be chosen carefully.
Let 𝑛 = 4𝑘 + 1 or 4𝑘 + 3. By squaring
(4𝑘 + 1)2 = _____________________________________ = 8𝑞 + 1
(4𝑘 + 3)2 = _____________________________________ = 8𝑞 + 1
Example 4. Show that the product of two integers of the form 4k + 1 is again of this form.
EXERCISES:
Level 1. Apply the division algorithm by stating the quotient and the remainder.
−7
a. −2 → −7 = __(−2) + __
−479
b. → −479 = __(29) + __
29
273
c. → 273 = __(−15) + __
−15
−394
d. → −394 = __(17) + __
17
−59
e. → __ = __(__)__
−6
FACTORS
The factors of a given integer are integers which when multiplied together form the
given integer. The factors of 10 are 5 and 2. Another set of factors of 10 are 10 and 1. Thus,
the complete set of factors of 10 is 1, 2, 5, and 10.
PRIME NUMBERS
If a positive integer greater than 1 has one and itself as its only factors, then the
integer is called a prime number. If a positive integer greater than 1 is NOT prime, then it is
called a composite number.
The integer 1 is neither prime nor composite. The integer 2 is the smallest prime
number, and the only even prime number. Also, there are infinitely many prime and
composite numbers.
Note that if an integer 𝑎 is composite, then it may be written as 𝑎 = 𝑏𝑐 where 1 < 𝑏 <
𝑎 and 1 < 𝑐 < 𝑎. If 𝑏 ≤ 𝑐, we have
𝑏 2 = 𝑏(𝑏) ≤ 𝑏(𝑐) = 𝑎, or 𝑏 ≤ √𝑎
For example, to determine if 𝑛 = 143 is prime, first we take the square root of 143.
Since
𝑝 < √143 < 12
then it is enough to consider the primes 𝑝 = 2,3,5,7 and 11 for the possible divisors.
Carrying out the division, we see that 11|143 and so, 143 = 11(13)
2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50
51 52 53 54 55 56 57 58 59 60
61 62 63 64 65 66 67 68 69 70
71 72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89 90
91 92 93 94 95 96 97 98 99 100
Twin Primes are pairs that differ by two. What are the twin primes between 1 and 100?
______________________________________________________________________________________________________
Challenge Query: How many primes are there between 100 and 200?
PRIME FACTORIZATION
Every positive integer 𝑛 greater than 1 can be written as a product of primes. Or, in
symbols,
𝑒 𝑒 𝑒
𝑛 = 𝑝11 𝑝22 … 𝑝𝑘𝑘
This representation of 𝑛 is called the canonical form or prime factorization of 𝑛.
In other words, “every positive integer greater than one can be written uniquely as a
product of primes, with the prime factors in the product written in order of increasing size”.
This is called the fundamental theorem of arithmetic where an integer 𝑛 can be written as a
product of prime factors.
For example, 12 = 22 ∙ 3, and 100 = 22 ∙ 52
METHODS TO DETERMINE PRIME FACTORIZATION OF 𝒏
Examples:
Examples:
COMMON FACTORS
A positive integer 𝑓 is said to be a common factor of 𝑎 and b if 𝑓|𝑎 and 𝑓|𝑏. What are
the factors of 24? ___________________________________ What are the factors of 30?
___________________________________. Thus, what are the common factors of 24 and 30?
___________________________________
The greatest common factor (GCF) or greatest common divisor (GCD) of 𝑎 and 𝑏 is
the positive integer 𝑑, denoted by 𝑑 = (𝑎, 𝑏), satisfying
i. 𝑑|𝑎, 𝑑|𝑏 and
ii. if 𝑓|𝑎 and 𝑓|𝑏, then 𝑓 ≤ 𝑑.
In other words, the greatest common divisor of two (or even more) integers 𝑎 and 𝑏,
that are not both zero, is the largest integer that divides both 𝑎 and 𝑏. It is the largest integer
which is a factor of all the given integers or it is the largest integer which can divide a given
set of integers.
Example: Find the greatest common divisor of the following pairs of integers.
a. 18, 12 c. 15, 81
b. 100, 5 d. – 6, - 15
Note that since the divisors of - 𝑎 are the same as the divisors of 𝑎, it follows that
(𝑎, 𝑏) = (|𝑎|, |𝑏|). Hence, we can restrict our attention to GCD’s of pairs of positive integers.
There are several methods to find the GCF of two (or more) integers. They are
A. Intersection of Sets Method. This involves listing all the factors of the given integers
and determining the common factors. Afterwards, the greatest common factors is
found.
Example: Find the GCF of 36 and 48 using the prime factorization method.
36 = __________________________________
48 = __________________________________
GCF of 36 and 48: ___________________ or (36,48) = ________
C. Continuous Division Method. This method involves dividing the integers by prime
factors until there are no more divisors. The product of the common divisors is the
GCF.
Example: Find the GCF of 36 and 48 using the continuous division method.
Example: Find the GCF of 24, 96, 72 using the continuous division method.
Example: Find the GCF of – 120, - 140, and 200 using the continuous division method.
Example: Find the GCF of 12, 14 and – 15 using the continuous division method.
Integers sharing no common divisors greater than 1 are called relatively prime. In
symbols, if (𝑎, 𝑏) = 1, then 𝑎 and 𝑏 are relatively prime to each other.
Example: What is the GCD of 25 and 42? Are they relatively prime?
We also say that the integers 𝑎1 , 𝑎2 , … , 𝑎𝑛 are pairwise relatively prime if for each pair
of integers 𝑎𝑖 and 𝑎𝑗 from the set (𝑎𝑖 , 𝑎𝑗 ) = 1, that is, if each pair of integers from the set is
relatively prime.
Example: Consider the integers 15, 28, and 37. Are they pairwise relatively prime?
Example: Consider the integers 10, 20 and 13. Are they pairwise relatively prime?
2. Find the GCF of the following using the prime factorization method
a. 15 and 21
b. 24 and 184
3. Find the GCF of the following using the continuous division method
a. 8, 10 and 12 d. 6, 15 and 21
4. Let 𝑎 be a positive integer. What is the greatest common divisor of 𝑎 and 2𝑎?
7. What is (𝑎2 + 𝑏 2 , 𝑎 + 𝑏), where 𝑎 and 𝑏 are relatively prime integers that are not both
zero?
8. Can you find three pairwise relatively prime integers from among the integers 66,
105, 42, 70, and 165?
10. Mrs. Kho wishes to cut as many pieces of rope of equal lengths as she can from 3
strands that are 70 cm, 98 cm and 112 cm long. If she wishes the pieces to be as long
as possible and does not wish to waste any rope, how long should she cut each piece?
Aside from the three methods previously discussed to find the GCF of two or more
numbers, we can also use a systematic method, or algorithm, to find the GCF of two positive
integers. This method is called the Euclidean algorithm. It is named after the ancient Greek
mathematician Euclid who described this algorithm in his book The Elements.
The Euclidean Algorithm. Let 𝑟0 = 𝑎 and 𝑟1 = 𝑏be integers s.t. 𝑎 ≥ 𝑏 > 0. If the
division algorithm is successively applied to obtain 𝑟𝑗 = 𝑟𝑗+1 𝑞𝑗+1 + 𝑟𝑗+2 with 0 < 𝑟𝑗+2 <
𝑟𝑗+1for j = 0, 1, 2, …, n – 2 and 𝑟𝑛+1 = 0, then (𝑎, 𝑏) = 𝑟𝑛 , the last remainder.
We can assume that we eventually obtain a remainder of zero since the sequence of
remainders 𝑎 = 𝑟0 > 𝑟1 > 𝑟2 >. . . ≥ 0 cannot contain more than 𝑎 terms. We can see that
(𝑎, 𝑏) = (𝑟0 , 𝑟1 ) = (𝑟1 , 𝑟2 ) =. . . = (𝑟𝑛−3 , 𝑟𝑛−2 ) = (𝑟𝑛−2 , 𝑟𝑛−1 ) = (𝑟𝑛−1 , 𝑟𝑛 ) = (𝑟𝑛 , 0) = 𝑟𝑛 .
Hence, (𝑎, 𝑏) = 𝑟𝑛 , the last nonzero remainder or the GCF of 𝑎 and 𝑏 is 𝑟𝑛 .
a. (252,198)
b. (378,858)
c. (666,1414)
d. (20785,44350)
Another equally important concept, like the greatest common factor, is the least
common multiple of the given integers.
The Least Common Multiple (LCM) of any two or more integers is the smallest
positive integer which is divisible by all integers. In other words, it is the smallest multiple
of each of the integers or it is the smallest factor that can divide the integers with a zero
remainder.
For example, given 𝑎 = 4 and 𝑏 = 6, then find [4,6] = 𝑚, list all the multiples of the
given integers.
Multiple of 4 = {4, 8, _______________, …}
Multiples of 6 = {6, ________________, …}
REMARKS:
The following are some immediate consequences of the definition.
a) (𝑎, 𝑏) ≤ [𝑎, 𝑏]
(4,6) ≤ [4,6]
𝑎𝑏
c) [𝑎, 𝑏] = (𝑎,𝑏), for positive integers 𝑎 and 𝑏
(4)(6)
[4,6] = (4,6)
The Intersection of Sets Method. List down the multiples of the given integers and find the
smallest common multiple of the given integers.
Prime Factorization Method. Write the prime factorizations of the integers and then multiply
all the common prime factors with the highest exponents. The product will then be
multiplied to the remaining factors that are not common to the given integers.
Continuous Division Method. Divide all the integers by prime factors until the quotient of
each integer is one. Multiply the prime divisors.
2. Major Major restaurant offered a free Cornetto for every 6th customer and a free hand
towel for every 8th customer. What is the least number of customers that the
restaurant had if 7 enjoyed both Cornetto and hand towel?
3. Mr. Binay, a security guard, is off-duty every fifth day. His wife, a nurse, gets a day off
every sixth day. If both of them are off-duty today (present day), then when will they
be off-duty again together the fourth time?
4. On its 10th anniversary, Mart One gave away a wallet for every 8th customer and a
notebook for every 12th customer. After 100, customers, how many had received both
a free wallet and a notebook?
5. Two Florida buses leave their Cubao terminal at 8 P.M. Bus A takes 40 minutes to
complete its route while Bus B takes 1 hour and 10 minutes. Assuming that the buses
are on time, when is the next time they will arrive together at the same terminal?
6. Mr. Ramos works in a factory with two sons. He is really happy with his job because
he gets to spend some time with his beloved sons not only at home but also at work.
He is allowed to take a break every 140 minutes while his two sons are allowed to
take breaks in 210 minutes and 280 minutes. How many minutes will they have to
wait after their first break together to get together again?
7. Ms. Ballesteros is really into gardening and she does on her own yard. She has a
rectangle-shaped garden full of beautiful flower beds but she decides that she needs
more trees. She wants to plant trees on every side and she would like to have them
placed the same distance from each other. If the long sides of her garden are each 24
m long and the short side each 18 m long, what is the fewest number of trees she
should plant?
8. Mr. and Mrs. Marzan are soon moving into their new home. They would like to have
their bathroom floor tiled. The bathroom is rectangle shaped and has sides 4.6 m and
6 m. What’s the side of the biggest square-shaped tile (in centimeters) that could be
used so that no space is left without tiles? (Don’t forget he can’t cut the tiles and
disregard the grout for the tiles)
10. Mrs. Co owns a small grocery store. She has just received 3 sacks of sugar weighing
27 kg, 36 kg and 72 kg and she wants to put them in equal-sized bags before she sells
them. What’s the least number of bags she would need if she doesn’t want any sugar
to be left without a bag?
11. When people joining a competition are grouped in 4s, 5s or 6s, 1 person is left out
each time. If we know that there are at least 150 people joining the competition, what
is the least number of people in this group?
12. Mrs. Rivera has baked 84 raisin cookies, 106 muffins and 128 chocolate chip cookies
which all smell delicious! They smell so good she would like to keep 4 raisin cookies,
6 muffins and 8 chocolate chip cookies for herself though she knows she has to cut
down on sweets. She’ll then put the rest into boxes with equal number of each type.
What would be the largest number of cookies or muffins in each box?
13. Mrs. Garcia has just baked a fruit cake for her son’s birthday party. The cake is shaped
like a rectangular prism with dimensions 6 cm, 8 cm, and 10 cm. She would like to cut
the cake into equal-sized cubes so that it’s easier for the kids to eat it. What’s the least
number of cubes she could get so that no part of the cake remains?
15. The LCM and GCF of two positive integers are 72 and 6, respectively. Find the product
of these two integers.
16. Give pairs of positive integers a and b that have a greatest common factor of 18 and
least common multiple of 540.
NUMBER OF DIVISORS
Without listing the positive divisors, is there a way by which we can determine the
number of divisors of a number? Here is the answer:
𝑒 𝑒 𝑒 𝑒
Let the positive integer n has prime factorization 𝑛 = 𝑃1 1 𝑃2 2 𝑃3 3 … 𝑃𝑘 𝑘 . Then, the
number of positive divisors of n is given by the formula:
The above formula directs us to express the integer n in its canonical form and then
consider the exponents.
B. Find the smallest integer n with 𝑑(𝑛) equal to each of the following integers
a) 1
b) 2
c) 3
d) 6
𝑒 𝑒 𝑒 𝑒
Let the positive integer n has prime factorization 𝑛 = 𝑃1 1 𝑃2 2 𝑃3 3 … 𝑃𝑘 𝑘 . Then, the
sum of the positive divisors of n is given by the formula:
𝑒 +1 𝑒 +1 𝑒 +1
𝑃1 1 − 1 𝑃2 2 − 1 𝑃𝑘 𝑘 − 1
𝜎(𝑛) = ∙ ∙…∙
𝑃1 − 1 𝑃2 − 1 𝑃𝑘 − 1
𝑒
We can derive the above formula by considering 1 + 𝑃1 + 𝑃12 + ⋯ + 𝑃1 𝑘 as a
𝑎(𝑟 𝑛 −1)
geometric series. Hence, the sum can be found by 𝑟−1 , where 𝑎 is the first term, 𝑟 is the
common ratio and 𝑛 is the number of terms.
Consider the following:
𝑒
𝜎(𝑃1 1 ) =
𝑒 𝑒
𝜎(𝑃1 1 ∙ 𝑃2 2 ) =
𝑒 𝑒 𝑒
𝜎(𝑃1 1 ∙ 𝑃2 2 ∙ … ∙ 𝑃𝑘 𝑘 ) =
Examples: Use the formula to evaluate the following:
1. 𝜎(200) =
2. 𝜎(720) =
3. 𝜎(10000) =
4. 𝜎(9!) =
5. 𝜎(215 − 1) =
2. 𝑛 = 37
3. 𝑛 = 97
Challenge: What can you conclude about the sum of the positive divisors of any prime
number?
Examples: Without using the formula, find the sum of the positive divisors 𝜎(𝑛) of the
following integers:
1. 𝑛 = 72
Express 24 in its prime form. Thus, 72 = 2332. To find the sum of the positive
divisors, add 20 up to 23, add 30 up to 32 and multiply the results.
𝜎(72) = ( )( ) = ( )( ) = _________
Check using the formula whether the results are the same.
2. 𝑛 = 520
3. 𝑛 = 4900
SEATWORK:
Find a partner and find the sum and number of positive divisors of the integers to
be written by your teacher on the board. Write your answers in a one-half sheet of pad
paper crosswise.
“In a corral, there are cowboys and horses. There are 20 legs in all. How many belong
to horses?”
If we let h be the number of horses and c be the number of cowboys in the corral, then
we know that
4h + 2c = 20,
assuming that all the horses and the cowboys are whole. This equation has infinitely many
solutions – for example,
5
−1 0
ℎ 3 √2
|
𝑐 20 10 − 2√2
12 10
3
But none of these fit the requirements of the problem; we want h and c to be
integers.
Equations of these sort, in which we look for solutions in a restricted class of
numbers – be they positive integers, negative integers, rational numbers, or whatever – are
called Diophantine equations, after Diophantus.
In this session, we will consider the simplest Diophantine equation: the linear
Diophantine equation
𝑎𝑥 + 𝑏𝑦 = 𝑐
where a, b, and c are integers. The equation ax + by = c clearly has infinitely many
solutions in rational numbers, namely those given by
(𝑐 − 𝑎𝑡)
𝑥 = 𝑡, 𝑦 =
𝑏
for any rational number t, if 𝑏 ≠ 0. But such an equation may have no solutions at all in
integers. for example, 2x + 4y = 5 has none. (Why?)
𝑏
𝑥 = 𝑥0 + (𝑏/𝑑)𝑛, 𝑦 = 𝑦0 − ( ) 𝑛,
𝑑
where n is an integer.
Example 4: A wallet contains 5-peso and 10-peso coins amounting to Php 45. How
many of each kind will produce the given amount?
(mental) Exercises
1. For each of the following linear Diophantine equations, either find all solutions, or
show that there are no integral solution.
a. 2𝑥 + 5𝑦 = 11
b. 17𝑥 + 13𝑦 = 100
c. 60𝑥 + 18𝑦 = 97
2. Determine the integral solutions for which x and y are positive.
a. 30𝑥 + 17𝑦 = 300
b. 54𝑥 + 21𝑦 = 906
c. 19𝑥 + 20𝑦 = 1909
3. A postal clerk has only P14 and P21 stamps to sell. What combinations of these may
be used to mail a package requiring postage of exactly P350?
4. A grocer orders apples and oranges at a total cost of P839. If the apples cost him P25
each and oranges cost him P18 each, how much each type of fruit did he order?
5. At a restaurant, the total cost of lobster is P110 and of chicken is P80. What can you
conclude if the total bill is P1000?
6. A shopper spends a total of P549 for mangoes, which cost P18 each and green apples,
which cost P33 each. What is the minimum number of pieces of fruit the shopper
could have bought?
7. Marion’s Theater charges P180 for adult and P75 for children for one advanced
screening. If the total receipts were P180,000, and assuming that more adults than
children were present, what is the minimum number of people who attended the
affair?
8. Vanessa’s piggy bank contains 59 coins, all 1-peso, 5-peso and 10-peso coins. If the
total value of coins is P200, what combinations of coins are possible?
9. The enrolment in the number theory class of Mr. Laciste consists of sophomores,
juniors and seniors. If each sophomore contributes P125, each junior P90, and each
senior P50, the class will have a fund of 2500. If there are 26 students, how many are
seniors?
10. Separate 1891 into two parts such that one part is a multiple of 21 and the other is a
multiple of 31.
INTRODUCTION TO CONGRUENCES
Congruences often arise in everyday life. For instance, clock works either in modulo
12 or 24 for hours, and modulo 60 for minutes and seconds, calendar works modulo 7 for
days of the week and modulo 12 for months. At the beginning of the nineteenth century,
this language of congruences was developed in number theory by Karl Friedrich Gauss. Its
definition is formally stated below.
Definition. Let m be a positive integer. If a and b are integers, we say that a is congruent
to b modulo m if 𝑚|(𝑎 − 𝑏).
Note that 𝑎 ≡ 𝑏(𝑚𝑜𝑑 𝑚) if and only if there is an integer k such that 𝑎 ≡ 𝑏 + 𝑘𝑚. We
also use the notation 𝑎 𝑚𝑜𝑑 𝑚 = 𝑟 to denote that r is the remainder obtained when a is
divided by m.
TRUE OR FALSE
1. 22 ≡ 5(𝑚𝑜𝑑 9) ______________
2. 23 ≡ 7(𝑚𝑜𝑑 8) ______________
3. 7 ≡ −13(𝑚𝑜𝑑 6) ______________
4. 3 ≡ −6(𝑚𝑜𝑑 9) ______________
5. −13 ≡ −5(𝑚𝑜𝑑 3) ______________
6. 19 𝑚𝑜𝑑 5 = 4 ______________
7. −8 𝑚𝑜𝑑 7 = 6 ______________
2. For which positive integers m are each of the following statements true?
a. 27 ≡ 5(𝑚𝑜𝑑 𝑚) ______________________________
b. 100 ≡ 1(𝑚𝑜𝑑 𝑚) ______________________________
c. 1001 ≡ 0(𝑚𝑜𝑑 𝑚) ______________________________
PROPERTIES OF CONGRUENCES
Let m be positive integer. Congruences modulo m satisfy the following properties:
1. If a is an integer, then 𝑎 ≡ 𝑎(𝑚𝑜𝑑 𝑚). [Reflexive Property]
2. If a and b are integers s.t. 𝑎 ≡ 𝑏(𝑚𝑜𝑑 𝑚), then 𝑏 ≡ 𝑎(𝑚𝑜𝑑 𝑚). [Synthetic Property]
3. If a, b, and c are integers with 𝑎 ≡ 𝑏(𝑚𝑜𝑑 𝑚) and 𝑏 ≡ 𝑐(𝑚𝑜𝑑 𝑚), then 𝑎 ≡ 𝑐(𝑚𝑜𝑑 𝑚).
[Transitive Property]
Solution: Without the application of the properties of congruences, this would be a tiresome
computation. Since 8 ≡ 0(𝑚𝑜𝑑 8), the 4!= 24 ≡ 0(𝑚𝑜𝑑 8). Hence, 𝑥! ≡ 0 for 𝑥 ≥ 4 and so
50
∑ 𝑥! = 1! + 2! + 3! + ⋯ + 50!
𝑥=1
≡ 1 + 2 + 6 ≡ 1(𝑚𝑜𝑑 8)
THEOREMS ON CONGRUENCES:
1. Fermat’s Theorem. If p is a prime and (𝑎, 𝑝) = 1, then
𝑎𝑝−1 ≡ 1(𝑚𝑜𝑑 𝑝).
Level-Up Exercises:
1. Find the least positive residue modulo 13 of each of the following integers.
a. 27 c. – 2
b. 101 d. – 98
b. 2110 is divided by 19
c. 7109 is divided by 6
e. ∑20
𝑥=1 𝑥! is divided by 9.
𝑎𝑥 ≡ 𝑏(𝑚𝑜𝑑 𝑚),
Linear Congruence Theorem. Let a, b, and m are integers with 𝑚 > 0 and (𝑎, 𝑚) = 𝑑. If 𝑑|𝑏,
then 𝑎𝑥 ≡ 𝑏(𝑚𝑜𝑑 𝑚) has no solutions. If 𝑑|𝑏, then 𝑎𝑥 ≡ 𝑏(𝑚𝑜𝑑 𝑚) has exactly d incongruent
solutions modulo m given by
𝑚
𝑥 = 𝑥0 + ( ) 𝑘
𝑑
where 𝑥 = 𝑥0 is a particular solution of the equation, and 𝑘 = 0,1,2, … , 𝑑 − 1
Example 5. Find the values of x in the linear congruence 45𝑥 ≡ 3(𝑚𝑜𝑑 6) where the values
of x are negative.
Example 6. Find the values of x in the linear congruence 35𝑥 ≡ 60(𝑚𝑜𝑑 98) where the values
are greater than 98.
In this session, we will consider system of congruences that involve only one variable,
but different moduli. Such system arose in ancient Chinese puzzles.
𝑥 ≡ 𝑎1 (𝑚𝑜𝑑 𝑚1 ),
𝑥 ≡ 𝑎2 (𝑚𝑜𝑑 𝑚2 ),
𝑥 ≡ 𝑎𝑟 (𝑚𝑜𝑑 𝑚𝑟 ),
Solution:
a. Find for 𝑀. 𝑀 = 𝑚1 𝑚2 𝑚3 = ________________________________
b. Find for 𝑀1 , 𝑀2 , and 𝑀3 using the formula 𝑀𝑘 = 𝑀/𝑚𝑘 .
𝑀 𝑀 𝑀
𝑀1 = 𝑚 𝑀2 = 𝑚 𝑀3 = 𝑚
1 2 3
Solution:
a. Find for 𝑀. 𝑀 = 𝑚1 𝑚2 𝑚3 = ________________________________
b. Find for 𝑀1 , 𝑀2 , and 𝑀3 using the formula 𝑀𝑘 = 𝑀/𝑚𝑘 .
𝑀 𝑀 𝑀
𝑀1 = 𝑚 𝑀2 = 𝑚 𝑀3 = 𝑚
1 2 3
Example 3. Find the three integers that leaves a remainder of one when divided by either 2
or 5, but that is divisible by 3.
Work in Pairs!
1. Find all the solutions of each of the following system of linear congruences
a. 𝑥 ≡ 4(𝑚𝑜𝑑 15) b. 𝑥 ≡ 3(𝑚𝑜𝑑 5)
𝑥 ≡ 3(𝑚𝑜𝑑 17) 𝑥 ≡ 2(𝑚𝑜𝑑 7)
𝑥 ≡ 5(𝑚𝑜𝑑 12)
2. Find all the solutions to the system of linear congruences 𝑥 ≡ 1(𝑚𝑜𝑑 2), 𝑥 ≡
2(𝑚𝑜𝑑 3), 𝑥 ≡ 3(𝑚𝑜𝑑 5), 𝑥 ≡ 4(𝑚𝑜𝑑 7), and 𝑥 ≡ 5(𝑚𝑜𝑑 11).
3. Find all the solutions to the system of linear congruences 𝑥 ≡ 1(𝑚𝑜𝑑 999), 𝑥 ≡
2(𝑚𝑜𝑑 1001), 𝑥 ≡ 3(𝑚𝑜𝑑 1003), 𝑥 ≡ 4(𝑚𝑜𝑑 1004), and 𝑥 ≡ 5(𝑚𝑜𝑑 1007).
1. Find the least positive integer which leaves remainders 1, 2, 3, and 5 when divided by
2, 3, 5, and 7, respectively.
2. Find a multiple of 11 that leaves a remainder of 1 when divided by each of the integer
2, 3, 7, and 13.
3. If a number of notebooks are divided equally among 77 students, there will be 27 left.
On the other hand, if these are divided among eight people, there will be none left.
What is the smallest number of notebooks there are?
4. A troop of monkeys store their bananas in eleven piles of equal size with a twelfth pile
of six left over. When they divide the bananas into 17 equal groups, none remains.
What is the smallest number of bananas they can have?
5. When students in a certain school are grouped by 2’s, 3’s, 4’s, 5’s or 6’s at a time, there
remain 1, 2, 3, 4, or 5 students, respectively. When the students are grouped by 7’s,
no student is left. What is the smallest possible number of students in the school?
6. Chinese generals counted troops remaining after a battle by lining them up in rows of
different lengths, counting the number of left over each time, and calculating the total
from these remainders. If a general had 1200 troops at the start of the battle and if
there were 3 left over when they lined up 5 at a time, 3 left overs when they lined up
6 at a time, 1 left over when they lined up 7 at a time, and none left over when they
lined up 11 at a time. How many troops remained after the battle?
WILSON’S THEOREM
If p is prime, then (p – 1)! ≡ (mod p).
Examples:
1. What is the remainder when 6! Is divided by 7?
Examples:
1. What is the remainder when 36 is divided by 7?
2. 36 (mod 7) =________.
As a consequence of the theorem, we can say that “If p is a prime and a is a positive
integer, then ap ≡ (mod p)”.
Examples:
4. What is the remainder when 511 is divided by 11?
𝝋(𝒏) 1 1 2 2 4 2 6 6 4
Do you discover some formation rule? If so, you should go on researching, because
you could solve number theoretic problems being open so far … If not, you might be
interested in some of the most important properties of the Euler function.
1
1. If n = pk where p is prime, then 𝜑(𝑛) = 𝑝𝑘 − 𝑝𝑘−1 = 𝑝𝑘 (1 − 𝑝).
Example: Calculate 𝜑(16) and 𝜑(81).
𝑒 𝑒 𝑒
2. If the prime factorization of n is given by 𝑛 = 𝑝11 𝑝22 … 𝑝𝑘𝑘 , we have 𝜑(𝑛) =
1 1
𝑛 (1 − 𝑝 ) … (1 − 𝑝 ).
1 𝑘
Example: Calculate 𝜑(24) and 𝜑(360).
3. The sum over the Euler function values 𝜑(𝑑) of all divisors d of an integer number n
exactly gives n.
Example: For n = 12:
𝜑(1) + 𝜑(2) + 𝜑(3) + 𝜑(4) + 𝜑(6) + 𝜑(12) = 1 + 1 + 2 + 2 + 2 + 4 = 12
Verify this for n = 16.