Number Theory
Total Page:16
File Type:pdf, Size:1020Kb
CHAPTER 3 Number Theory 1. Factors or not According to Carl Friedrich Gauss (1777-1855) mathematics is the “queen of sciences” and number theory is the “queen of mathematics”, where “queen” stands for elevated and beautiful. Number theory is mainly the study of the system of integers Z = 0, 1, 2,... and the consequences of the fact that division is not always possible within{Z.± E.g.± 15/3 } Z but 15/4 / Z. ∈ Let us start∈ with the well-known “long division” that has rather surprising consequences. EXAMPLE 1.1. 300 396 090 006 223 88323 | 669 223 88323 | 66900 (= 300 223) 21423 · 2007 21423 20070 (= 90 223) 1353 · 1338 1353 1338 (= 6 223) 45 · 45 What is really being done and what has been achieved? On the right some zeros are filled in that are not written on the left. We now see that 88323 300 223 90 223 6 223 = 45. − · − · − · In effect, multiples of 223 were subtracted from 88323 until 223 could not be subtracted anymore without running into negative numbers. The mathematical content of “long divi- sion” is the following theorem and “long division” is just an efficient way of finding q and r in the “Division Theorem”. 1 2 3. NUMBER THEORY THEOREM 1.2. Division Theorem. Given integers a, b, b > 0, there exist unique integers q and r such that a = qb + r, 0 r < b ≤ The quotient q and the remainder r can be found by repeated subtractionof b. The division algorithm is just an efficient way for computing q and r by repeated subtractions. EXAMPLE 1.3. Let a = 567923 and b = 735. Find non-negative integers q and r such that 567923 = 735q + r and 0 r < 735. Answer: By Long Division≤ we find q = 772 and r = 503. EXAMPLE 1.4. Let a = 3257397 and b = 7593. Find non-negative integers q and r such that 3257397 = 7593q + r and 0 r < 7593. Answer: By Long Division we find≤ q = 429 and r = 0. DEFINITION 1.5. An integer a is even ifa = 2x for some integer x, i.e., r = 0 in Theorem ??. An integer b is odd if b = 2x + 1 for some integer x in Z, i.e., r = 1 in Theorem ??. PROPOSITION 1.6. Every integer is either even or odd. The product of two odd integers is odd. PROOF. Let a and b be odd integers. According to the definition of “odd integer” there exist integers x and y such that a = 2x + 1 and b = 2y + 1. Then ab = (2x + 1)(2y + 1)=(2x + 1)(2y)+(2x + 1) 1 · = 2(y(2x + 1)) + 2x + 1 = 2(y(2x + 1) + x) + 1. Here z = y(2x + 1) + x is an integer by the closure properties of Z, hence ab = 2z + 1is an odd number. THEOREM 1.7. √2 is not rational. PROOF. (Aristotle) By way of contradiction assume that √2 = a/b where either a or b 2 2 2 is odd. Then 2b = a , hence a is even and therefore a is even. This means that a = 2a′ 2 2 2 2 and substituting 2b = 4a′ . Thus b = 2a′ . This says that b is even, a contradiction. DEFINITION 1.8. (1) Let a, f be integers. We say that f is a factor of a if a = f someinteger or a = f a′ for some integer a′. · · (2) Let a and b be given integers. An integer f is a common factor ofaandbif f is a factor of a and a factor of b. (3) The greatest common factor of two integers a and b is the largest among the common factors of a and b. The greatest common factor of a and b is denoted by gcf(a,b). 1. FACTORS OR NOT 3 REMARK 1.9. In the literature it is much more common to say f divides a (or f divides a evenly) than to say that f is a factor of a. However, the first gets confused with other uses of “divide” and therefore we will avoid its use. REMARK 1.10. Suppose that a and b are positive integers. Then b is a factor of a if and only if in the Division Theorem a = qb+r the remainder r = 0. Therefore instead of saying b is a factor of a it is also said that b divides a evenly. Factoring Rules. Let a be a positive integer given in base 10 representation. Then the following rules are true. (1) 2 is a factor of a if its units digit is even. (2) 3 is a factor of a if 3 is a factor of the sum of the digits of a. (3) 4 is a factor of a if 4 is a factor of the number formed by the last two digits of a. (4) 9 is a factor of a if 9 is a factor of the sum of the digits of a. Recall that gcf(a,b) is the largest among the common factors of a and b. Therefore gcf(a,b) can be found in the following way which is instructive but not very efficient. REMARK 1.11. Finding greatest common factors Let a and b be given integers. (1) List the positive factors of both a and b. (2) List the common (positive) factors of a and b. (3) Pick the largest in the list of common factors. EXAMPLE 1.12. Finding greatest common factors. Let a = 12 and b = 28. (1) The positive factors of 12 are 1,2,3,4,6,12. (2) The positive factors of 28 are 1,2,4,7,14,28. (3) The common factors are 1,2,4. (4) The greatest common factor is 4. EXAMPLE 1.13. Let a = 240 and b = 330. The positive factors 0f 240 are 1,2,3,4,5,6,8,10,12,15,16,20,24,30,40,48,60,80,120,240, and the positive factors of 330 are 1,2,3,5,6,10,11,15,22,30,33,55,66,110,165,330. The positive common factors of a and b are 1,2,3,5,6,10,15,30, and the greatest common factor of a and b is 30, gcf(240,330) = 30. The following lemmas will be used over and over again and should be memorized. LEMMA 1.14. Let a,b,c be integers and suppose that c = a + b. If a number f is a factor of two of the three integers a,b,c, then f is a factor of the third. LEMMA 1.15. Let a andb be integers. If f isa factorofa, then f is afactorof ab. 4 3. NUMBER THEORY EXERCISE 1.16. (1) Rewrite the number 1239584 in the form as 1239584 = 12395 100 + 84. Use Lemma ?? and Lemma ?? to show that 4 is a factor of 1239584· because 4 is a factor of 84. (2) Rewrite the number 1239582 in the form as 1239582 = 12395 100 + 82. Use Lemma ?? and Lemma ?? to show that 4 is NOT a factor of 1239582· because 4 is NOT a factor of 82. The Euclidean Algorithm is a very beautiful and efficient way of finding the greatest com- mon factor of two integers. It is bases on the following fact. LEMMA 1.17. Let a and b be integers and a = bq + r for some integers q and r. Then the common factors of a and b are exactly the same as those of b and r. In particular, gcf(a,b) = gcf(b,r). EXAMPLE 1.18. Let a = 56371 and b = 3476. Then a = 16 b + 755, hence · gcf(56371,3476) = gcf(3476,755). Further, 3476 = 4 755 + 456, so · gcf(56371,3476) = gcf(3476,755) = gcf(755,456). Further, 755 = 1 456 + 299, 456 = 1 299 + 157, 299 = 1 157 + 122, 157 = 1 122 + 35, hence · · · · gcf(56371,3476) = gcf(755,456) = gcf(456,299) = gcf(299,157) = gcf(157,122) = gcf(122,35). It is clear that 35 has the positive factors 1,5,7,35 and of these only 1 is a factor of 122. Hence gcf(56371,3476) = 1. THEOREM 1.19. Let a and b be (positive) integers. Then there exist integers u and v such that gcf(a,b) = ua + vb. Consequently, every common factor of a and b is a factor of gcf(a,b). The integers u, v and gcf(a,b) can be found efficiently using the Euclidean Algorithm described below. EXAMPLE 1.20. Let a = 569321 and b = 347. Then gcf(69321,347) = gcf(a,b) = ua+vb where gcf(a,b) = 1,u = 36 and v = 59065. − PROOF. 1. FACTORS OR NOT 5 (1) 569321 = 1 569321 + 0 347 (2) 347 = 0 · 569321 + 1 · 347 (3)=(1) 1640 (2) 241 = 1 · 569321 1640 · 347 (4)=(−2) 1 · (3) 106 = 1 · 569321 +− 1641 · 347 (5)=(3) − 2 · (4) 29 = −3 · 569321 4922 · 347 (6)=(4) − 3 · (5) 19 = 10 · 569321 +− 16407 · 347 (7)=(−5) · (6) 10 = −13 · 569321 21329 · 347 (8)=(6) − (7) 9 = 23 · 569321 +− 37736 · 347 (9)=(7) − (8) 1 = −36 · 569321 59065 · 347 − · − · The long divisions used: 569321 = 1640 347 + 241 347 = 1 · 241 + 106 241 = 2 · 106 + 29 106 = 3 · 29 + 19 29 = 1 · 19 + 10 19 = 1 · 10 + 9 10 = 1 · 9 + 1 · The same process can be done in a short form that only lists the essential data. action a b (1) 569321 1 0 (2) 347 0 1 (3)=(1) 1640 (2) 241 1 - 1640 (4)=(−2) 1 · (3) 106 -1 + 1641 (5)=(3) − 2 · (4) 29 3 - 4922 (6)=(4) − 3 · (5) 19 -10 + 16407 (7)=(5)-(6)− · 10 13 - 21329 (8)=(6)-(7) 9 -23 + 37736 (9)=(7)-(8) 1 36 - 59065 EXAMPLE 1.21.