Professional Documents
Culture Documents
Chapter2 - Divisibility and Factorization - 211026 - 150908 PDF
Chapter2 - Divisibility and Factorization - 211026 - 150908 PDF
Chapter2 - Divisibility and Factorization - 211026 - 150908 PDF
In this situation q is called the quotient and r is called the remainder in the
division of a by b. Note that there are two parts to this result. One part is
the existence of integers q and r satisfying (2.1) and the second part is the
uniqueness of the integers q and r satisfying (2.1).
1
2 MAT 222
(2.2) r2 − r1 = b(q1 − q2 ).
This gives |r2 − r1 | = b|q1 − q2 |. Using the fact that −b < −r1 ≤ 0 and
0 ≤ r2 < b, by adding we obtain −b < r2 −r1 < b, or equivalently, |r2 −r1 | < b.
Thus, b|q1 −q2 | < b, and so 0 ≤ |q1 −q2 | < 1. But |q1 −q2 | is a natural number,
then we must conclude that |q1 − q2 | = 0. Hence q1 = q2 . Now from (2.2) we
have r2 − r1 = 0, that is, r1 = r2 . This completes the proof of the uniqueness
of r and q in (2.1).
Corollary 2.1. If a and b are integers, with b ̸= 0, then there exist unique
integers q and r such that a = bq + r, 0 ≤ r < |b|.
Example. The following five statements are equivalent, that is, they are
all different ways of saying the same thing:
2 | 6 or (2 divides 6) or (2 is a divisor of 6) or (2 is a factor of 6) or (6 is a
multiple of 2).
4 MAT 222
4. d | n =⇒ ad | an (multiplication property)
√ √
This implies that 2 is an integer, which is a contradiction. Therefore 2 is
an irrational number.
Remark. There are interesting well-known variations on the proof of the
previous theorem either involving the next fundamental theorem of arith-
metic or based on the parity of a2 and b2 .
Corollary 2.2. If a and b are given integers, not both zero, then the set
Hence, nd ∈ T.
Definition 2.9. Two integers a and b, not both zero, are said to be relatively
prime whenever gcd(a, b) = 1.
Theorem 2.5. Let a and b be integers, not both zero. Then a and b are
relatively prime if and only if there exist integers x and y such that 1 =
ax + by.
Proof. If a and b are relatively prime, then gcd(a, b) = 1. Hence by the
previous theorem, there exist x and y such that 1 = ax + by. Conversely,
suppose that 1 = ax + by for some integers x and y, and that d = gcd(a, b).
Since d | a and d | b, then by Theorem 2.2, d | ax + by, so d | 1. Hence
d = 1.
Corollary 2.3.
1. If gcd(a, b) = d, then gcd(a/d, b/d) = 1.
2. If a | c and b | c, with gcd(a, b) = 1, then ab | c.
Example. We have gcd(−12, 30) = 6, and indeed gcd(−12/6, 30/6) =
gcd(−2, 5) = 1.
Theorem 2.6. (Euclid’s lemma). If a | bc, with gcd(a, b) = 1, then a | c.
MAT 222 7
Example.
(1) lcm(3, 5)=15, lcm(4,6)=12, lcm(7, 9)= 63, lcm(36, 48)=144.
(2) The positive common multiples of the integers -12 and 30 are 60, 120, 180, . . . .
Hence, lcm( -12, 30) = 60.
Theorem 2.7. Let a and b be two integers. We have
Remark. Note that we have formed the gcd of 803 and 154 without fac-
toring 803 and 154. This method is generally much faster than factoring and
can find gcd’s when factoring is not feasible.
Exercise. Find gcd(a, b) using the Euclidean Algorithm for each of the val-
ues: (1) a = 37, b = 60 and (2) a = 377, b = 233.
Corollary 2.5. For any integer k ̸= 0, gcd(ka, kb) = |k| gcd(a, b).
Proof. Assume, by way of contradiction, that there are only a finite number
of prime numbers, say:
p1 , p 2 , . . . , p n .
Define
N = p1 p2 · · · pn + 1.
Since p1 ≥ 2, clearly N ≥ 3. So by the Fundamental Theorem of Arithmetic
N has a prime divisor p. By assumption p = pi for some i = 1, . . . , n since
p1 , p2 , . . . , pn are the only prime numbers. Let a = p1 · · · pn . Note that
The following illustration shows steps of sieving for n = 17. The elements of
the processed set are not bold, and removed composite numbers are in bold.
First, we remove multiples of the smallest element in the set, which is 2. The
next element
[ remaining in the set is 3, and we also remove
√ its 2multiples, and
so on. Here the next element
] is 5 (a prime), but 5 > 17, (5 17), so the
process stops at this step
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Hence, all the prime numbers in the range from 2 to 17 are: 2, 3,5, 7, 11, 13,
17.
Exercise. Find all the prime numbers less than or equal to 30.
Remark.
(1) A linear Diophantine equation can have a number of solutions. As
example, consider the equation 3x + 6y = 18. Then x = 4, y = 1 is a
solution since 3.4 + 6.1 = 18, x = −6, y = 6 and x = 10, y = −2 are
also solutions since 3(-6) + 6.6 = 18, 3.10 + 6(-2) = 18.
(2) Also, a linear Diophantine equation can have no solutions. As example,
the equation 2x + 10y = 17 has no solution since the left-hand side is
even for all x, y while 17 is odd.
Theorem 2.12. The linear Diophantine equation ax + by = c has a solution
if and only if d | c, where d = gcd(a, b). Further, if x0 , y0 is any particular
solution of this equation, then all other solutions are given by
(b) (a)
x = x0 + t, y = y0 − t
d d
where t is an arbitrary integer.
12 MAT 222
Hence gcd(172, 20) = 4. Thus, by the previous theorem and since 4 | 1000, a
solution to this equation exists.
Let us now find a particular solution. From the previous calculations, we have
4 = 12−8 = 12−(20−12) = 2.12−20 = 2.(172−8.20)−20 = 2.172+(−17).20
Hence, 4 = 2.172 + (−17).20. Multiplying by 250 gives
x = x0 + bt y = y0 − at