MODULE 2 Divisibility Theory in the Integers INTRODUCTION In this topic we define divisibility and work through simple examples to explain how divisibility is important. We then state and prove several basic properties, one of which will use mathematical induction in its proof. The concept of divisibility is the main difference between the integers and the rational numbers. Indeed, the sum, difference, and product of two integers are an integer, but the quotient of two integers may not be an integer. OBJECTIVES: At the end of this chapter, you should be able to: 1. carry out division algorithm in establishing divisibility statements; 2. use the concept of division algorithm in finding the greatest common divisor; 3. represent the greatest common divisor as a linear combination of x and y; 4. find the number and sum of the divisors of N and 5. determine the solutions of linear diophantine equations in n unknowns. 27 2.1 DIVISION ALGORITHM In this module we state how the division algorithm can be used as a technique of proof to prove many results in number theory by reducing a statement concerning an infinite set of integers into a finite number of cases. The division algorithm allow us to classify a positive integer according to its remainder. For example, every integer is either even or odd (not both); that is, every integer has a remainder of 0 or 1 when divided by 2. Although not truly an algorithm in the traditional sense, the division algorithm allow us to prove statements about the integers by considering only a finite number of cases. Division Algorithm If a and b are integers such that b > 0, then there exist unique integers q and r such that a = qb + r with 0 ≤ r < b. The integers q and r are called respectively, the quotient and the remainder in the division of a by b. Illustrations: 1) 7 = 3(2) + 1 2) 15 = 5(3) + 0 3) 27 = 4(6) + 3 Something to remember: 1) With b = 2, the possible remainders are r = 0 and r = 1, when r = 0, the integer a has the form a = 2q and is called even, when r = 1, the integer has the form a = 2q + 1 and is called odd. In other words If b > 0 then n1 < a/b < n2; where n1 and n2 Z n2 = n1 + 1 choose q = n1 and r = a - bq 2) If b < 0, then there exist unique integers q and r such that a = qb + r with 0 ≤ r < b. To illustrate the division algorithm when b < 0, let us consider b = -7. Then for choices a = 1, -4, 47 and -59, one gets the expressions 28 1 = 0(-7) + 1 -4 = 1(-7) + 3 47 = (-6)(-7) + 5 -59 = 9(-7) + 4 In other words If b < 0 then n1 < a/b < n2; where n1 and n2 Z n2 = n1 + 1 choose q = n2 and r = a - bq 3) Of special significance is the case in which the remainder in the division algorithm turns out to be zero. What can you say about this case? In other words, if ba then q = a/b and r = 0. Example. Show that the expression m(m2 + 2) 3 is an integer for any positive integer m. Solution: Equivalently, we need to show that m(m2 + 2) is of the form 3k for some k for any positive m. By the division algorithm, m has exactly one of the form 3k, 3k + 1 or 3k + 2. Assume the first of these cases, we have m = 3k. (3k)[(3k)2 + 2] (3k)(9k 2 + 2) = 3 3 = k (9k 2 + 2), which clearly is an integer. If m = 3k + 1 for some k then (3k + 1)[(3k + 1)2 + 2] (3k + 1)[(9k 2 + 6k + 1) + 2] = 3 3 29 (3k + 1)(9k 2 + 6k + 3) = 3 = (3k + 1)(3)(3k 2 + 2k + 1) 3 = (3k + 2) (3k 2 + 4k + 2), which is an integer in this instance also. Finally, if m = 3k + 2 for some k then (3k + 2)[(3k + 2)2 + 2] (3k + 2)[(9k 2 + 12k + 4) + 2] = 3 3 = (3k + 2)(9k 2 + 12k + 6) 3 (3k + 2)(3)(3k 2 + 4k + 2) = 3 = (3k + 2) (3k 2 + 4k + 2), which clearly is an integer. SCQ1: Discuss the expression “ab” when a and/or b is zero. 30 Activity 2.1 1. Find q and r for the following values of a and b so that a = bq + r and 0 ≤ r ≤ b. a) a = 17 and b = 12 b) a = 78 and b = 6 c) a = 42 and b = -8 d) a = 135 and b = -17 e) a = -57 and b = -9 f) a = -237 and b = -69 2. Show that the product of any three consecutive integers is divisible by 6. 31 2.2 DIVIDES RELATION The symbol “ ” means “divides” or “is a factor of”. An integer a is said to be divisible by an integer b ≠ 0, in symbol ba, if there exists some integer k such that a = bk. We write ba to indicate that a is not divisible by b (b is different from zero). Illustrations: 1) 210 or 10 is divisible by 2, since 10 = 2(5) 2) 4-16 or -16 is divisible by 4, since -16 = 4(-4) 3) 314 or 14 is not divisible by 3, for there is no integer k which makes the statement 14 = 3k. There is other language for expressing the divisibility relation ba. One could say that b is a factor of a, that b is a divisor of a or that a is a multiple of b. Something to remember: If b is a divisor of a, then a is also divisible by –b, that is a = bc then, a =(-b)(-c). Theorem 2-1: For any integers a, b and c, the following hold 1) 2) 3) 4) 5) 6) 7) a0, 1a, aa a1 if and only if a = 1 If ab and cd, then acbd If ab and bc, then ac ab and ba if and only if a = b If ab and b ≠ 0, then a ≤ b If ab and ac, then a(bx + cy) for arbitrary integers x and y There are problems that require us to list the possible divisors of a given positive integer N. It is not difficult to answer like this when the given integer is small. For example the positive divisors of -6 are 1, 2, 3, 6, while those of 8 are 1, 2, 4, 8; hence, the positive common divisors of -6 and 8 are 1 and 2. It is only becomes intricating as the given integer N becomes bigger. How much more complicated when the problem requires us to give the number and sum of these divisors after listing them. 32 2.3 GREATEST COMMON DIVISOR(gcd) The Division Algorithm leads to a method of finding gcd(Greatest Common Divisors) that is of great theoretical and practical importance. Definition: Let a, b Z. The gcd(Greatest Common Divisor) of a and b, denoted by gcd(a, b), is a positive integer d such that 1) d divides both a and b; 2) any divisor of both a and b also divides d. The greatest common divisor of two or more integers is the largest natural number that will divide exactly all given numbers. Example: Find the gcd of -12 and 45. Solution: The positive divisors of -12 are 1, 2, 3, 4, 6, 12, while of those 45 are 1, 3, 5, 9, 15, 45; hence, the positive common divisors of -12 and 45 are 1, 3. Since 3 is the largest of these integers, it follows that gcd(-12, 45) = 3. 2.4 EUCLIDEAN ALGORITHM The greatest common divisor of two integers can be found by using the previously mentioned method; but this is cumbersome for large numbers. The Euclidean Algorithm, also called Euclid’s Algorithm is an alternative method for finding the greatest common divisor of two numbers a and b. The Euclidean Algorithm: Given positive integers a and b, apply the Division Algorithm, obtaining a = bq1 + r1 If r1 = 0, then the GCD of a and b equals b. If r1 ≠ 0, again apply the Division Algorithm to b and r1, obtaining b = r 1 q2 + r 2 If r2 = 0, then the GCD of a and b is equal to r1 . If r2 ≠ 0, repeat the algorithm with r1 and r2 , obtaining r1 = r2 q3 + r3 33 Continue in this way while rk ≠ 0, ignoring the quotients qk, and repeating the Division Algorithm with rk-1 and rk. Then the GCD of a and b is the last nonzero remainder rm. Example: Use the Euclidean Algorithm to find the GCD of 184 and 190. Solution: 190 = 184(1) + 6 the underlined numbers will be “shifted left” and used in the Division Algorithm in the next step; ignore q1 = 1. 184 = 6(30) + 4 “shift” underlined numbers; ignore q2 = 30. 6 = 4(1) + 2 “shift” underlined numbers; ignore q3 = 1. 4 = 2(2) + 0 stop, since r4 = 0. The last nonzero remainder is 2, so the GCD(184, 190) = 2. The next theorem indicates that gcd(a, b) can be represented as a linear combination of a and b (by a linear combination of a and b, we mean an expression of the form ax + by), where x and y are integers. This is illustrated by gcd(-12, 30) = 6 = -12(2) + 30(1) Theorem 2-2 Given integers a and b, not both of which are zero, there exist integers x and y such that gcd(a, b) = ax + by Proof: (Left as an exercise) Example: Use Euclidean Algorithm to obtain x & y satisfying gcd(4806, 2178) = 4806x + 2178y . Solution: First, find the gcd(4806, 2178) using Euclidean Algorithm 4806 = 2178(2) + 450 34 2178 = 450(4) + 378 450 = 378(1) + 72 378 = 72(5) + 18 72 = 18(4) + 0 The last nonzero remainder is 18, so the GCD(4806, 2178) = 18. To represent 18 as a linear combination of the integers 4806 and 2178, we start with the next-to-last of the displayed equations and successively eliminate the remainders 72, 378, and 450. 18 = 378 – 72(5) = 378 + 72(-5) = (450 - 72) + 72(-5) = 450 + 72(-1) + 72(-5) = 450(1) + 72(-6) = 450(1) + [450 – 378(1)] (-6) = 450(1) + 450(-6) + 378(6) = 450(-5) + 378(6) = 450(-5) + [2178 -450(4)] (6) = 4509(-5) + 2178(6) + 450(-24) = 450(-29) + 2178(6) = [4806 – 2178(2)] (-29) + 2178(6) = 4806(-29) + 2178(58) + 2178(6) 18 = 4806(-29) + 2178(64) Thus, we have 18 = gcd(4806, 2178) = 4806(-29) + 2178(64) where x = -29 and y = 64. 35 2.5 LEAST COMMON MULTIPLE(LCM) The least common multiple(LCM) of two or more integers is the smallest natural number which is the multiple of all of them or can be divided exactly by all the given numbers. Definition: The least common multiple of two non zero integers a and b, denoted by LCM(a, b), is the smallest positive integer m satisfying; 1) am and bm 2) If ac and bc, with c > 0, then m ≤ c. Theorem 2-3 For any positive integers a and b gcd(a, b) LCM(a, b) = ab LCM(a, b) = ab gcd(a, b) Example: Find the least common multiple of 4806 and 2178. Solution: In our previous example, we see that gcd(4806, 2178) = 18. Applying the theorem LCM(4806, 2178) = = (4806)(2178) gcd(4806, 2178) 10,467,468 18 LCM(4806, 2178) = 581,526 SCQ2: Write (136, 232) as a sum of multiples of 136 and 232. 36 Activity 2.2 1. Find the greatest common divisor of the given pair of integers by means of the Euclidean Algorithm. a. 495 and 750 b. 291 and 97 c. 2,268 and 11,232 d. 7,705,152 and 2,095,632 2. Use the Euclidean Algorithm to obtain integers x and y satisfying: a. gcd(272, 119) = 272x + 119y b. gcd(1769, 2378) = 1769x + 2378y 3. Find the least common multiple(LCM) of the given pair of integers. a. 227 and 143 b. 272 and 1479 37 2.6 LINEAR DIOPHANTINE EQUATION It is customary to apply the term Diophantine equation to any equation in one or more unknown, which is to be solved in the integers. The simplest type of Diophantine equation that we shall consider is the linear Diophantine equation in two unknowns x and y, ax + by = c where a, b, c are given integers and a, b not both zero. The solution of this equation is a pair of integers x0, y0 which, when we substituted into the given equation, satisfy it; that is ax0 + by0 = c. A given linear Diophantine equation can have a number of solutions, as in the case of 6x + 3y = 18, where 6(1) + 3(4) = 18 6(6) + 3(-4) = 18 6(-2) + 3(10) = 18 By contrast, there is no solution to the equation 10x + 2y = 13. Indeed, the left hand side of the equation is an even integer whatever the choice of x and y, while the right hand is an odd integer. Theorem 2-4 The linear Diophantine equation ax + by = c has a solution if and only if dc, where d = GCD(a, b). If x0, y0 is any particular solution of this equation, then all other solutions are given by x = x0 + (b/d)t , y = y0 - (a/d)t for varying integers t. Example: Find the solution of linear Diophantine equation 54x + 21y = 906. Solution: Applying the Euclidean Algorithm to the evaluation of gcd(54, 21), we find that 38 54 = 21(2) + 12 21 = 12(1) + 9 12 = 9(1) + 3 9 = 3(3) + 0 Hence, gcd(54, 21) = 3. Since 3906, a solution to this equation exists. To obtain the integer 3 as a linear combination of 54 and 21, we have 3 = 12 – 9(1) = 12(1) + 9(-1) = 12(1) + [21 – 12(1)] (-1) = 12(1) + 21(-1) + 12(1) = 12(2) + 21(-1) = [54 – 21(2)](2) + 21(-1) = 54(2) + 21(-4) + 21(-1) 3 = 54(2) + 21(-5) Upon multiplying this relation by 906/3 = 302, one arrives at 906 = 302(3) 906 = 302 [54(2) + 21(-5)] 906 = 54(604) + 21(-1510) x0 = 604 and y0 = -1510 provides one solution of the Diophantine equation. All other solutions are expressed by x = 604 + (21/3)t = 604 + 7t y = -1510 – (54/3)t = -1510 -18t for some integer t. 39 Diophantine equations frequently arise in solving of certain types of traditional “word problems”. Example: The SM cinema charges 180 pesos for adult admission; and 75 pesos for children. On a particular screening the total receipts were 9000 pesos. Assuming that more adults than children were present how many people(maximum) attended? Solution: Let x = number of adults attended y = number of children attended Setting up the equation, we have 180x + 75y = 9000 Applying the Euclidean Algorithm to the evaluation of GCD(180, 75), we find that 180 = 75(2) + 30 75 = 30(2) + 30 30 = 15(2) + 0 Hence, GCD(180, 75) = 15. Since 159000, a solution to this equation exists. To obtain the integer 15 as a linear combination of 180 and 75, we have 15 = 75 – 30(2) = 75(1) + 30(-2) = 75(1) + [180 – 75(2)] (-2) = 75(1) + 180(-2) + 75(4) 15 = 180(-2) + 75(5) Upon multiplying this relation by 9000/15 = 600, one arrives at 40 9000 = 600(15) 9000 = 600 [180(-2) + 75(5)] 9000 = 180(-1200) + 75(3000) x0 = -1200 and y0 = 3000 provides one solution of the Diophantine equation. All other solutions are expressed by x = -1200 + (75/15)t = -1200 + 5t y = 3000 – (80/15)t = 3000 -12t where, 240 < t < 250 t = { 241, 242, 243, 244, 245, 246, 247, 248, 249 } T 241 242 243 244 245 246 247 248 249 x(adults) 5 10 15 20 25 30 35 40 45 y(children) 108 96 84 72 60 48 36 24 12 Total 113 106 99 92 85 78 71 64 * 57 * The maximum people who attended where more adults was present is 64. SCQ3: Obtain all positive solutions of the Diophantine equation 7x + 5y = 100. 41 Activity 2.3 1. Which of the following Diophantine equations cannot be solved? Explain why? a. 33x + 14y = 115 b. 14x + 35y = 93 c. 6x + 51y = 22 2. Determine the solution of the following Diophantine equations a. 57x – 81y = 3 b. 221x + 35y = 11 c. 126x - 117y = 87 3. Find all the positive solutions of the following Diophantine equations. a. 18x + 5y = 48 b. 123x + 360y = 99 4. Solve the following problems. a. A wallet contains 5 and 10 bills amounting to 45 pesos. How many of each kind will produce the given amount. b. Divide 1891 into two parts such that one part is a multiple of 21 and the other part is a multiple of 31. 42 43