Math 480/580 Number Theory Notes. Richard Blecksmith

Size: px
Start display at page:

Download "Math 480/580 Number Theory Notes. Richard Blecksmith"

Transcription

1 Math 480/580 Number Theory Notes Richard Blecksmith

2

3 Contents Chapter 1. Introduction 5 1. Beginning Exercises 5 2. Counting the primes 6 Chapter 2. Math 420 Number Theory Review 9 1. Divisors 9 2. Divisibility 9 3. Congruences Congruence Facts Induction The Division Algorithm Mod n Tables The Pails of Water Problem Greatest Common Divisor 17 Chapter 3. Continued Fractions Finite Continued Fractions Infinite Continued Fractions Quadratic Irrationals - a Detailed Example Quadratic Irrationals - The General Situation Lagrange s Theorem Continued Fraction Worksheet Three Important Theorems 38 Chapter 4. Diophantine Questions Perfect Numbers Fermat s Method of Descent Sums of Squares 46 Chapter 5. Congruences and Polynomials Linear Congruences ax b mod m Euler s Phi Function Polynomial Congruences 54 3

4 4 CONTENTS 4. Primitive Roots 56 Chapter 6. Quadratic Residues The Legendre Symbol Euler s Criterion Gauss s Lemma Quadratic Reciprocity 65

5 CHAPTER 1 Introduction 1. Beginning Exercises #1. [Adding Fractions] When is the sum of two fractions a + c b d terms) an integer? (written in lowest #2. [Factoring in your head] Factor in your head. #3. [Perfect numbers] A numper n is called perfect if it is the sum of all of its divisors except n itself. For example, n = 6 is perfect, since 6 = What are the next two perfect numbers? Can you write these two numbers as sums of consecutive cubes? #4. [Composites] Show that for any n > 1, n 4 +4 is always a composite number. #5. [How many apples?] Mary has a bag full of apples. When they are counted three at a time, there is eactly one left over. When they are counted five at a time, there are three left over. How may apples does Mary have? #6. [Reducing fractions] Write the fraction in lowest terms. #7. [Find the remainder] What is the remainder when is divided by 7? #8. [How many primes] How many numbers whose decimal expansion have the form (beginning and ending with 1 and alternating between 0 and 1) are prime? 5

6 6 1. INTRODUCTION 2. Counting the primes Never underestimate the value of a theorem which counts something John Olson (i) Let S = {p 1,p 2,p 3,...,p j } be a collection of (distinct) primes. Let x be a positive real number. Let f(x) = the number of integers n, 1 n x, such that p does not divide n if p is a prime not in set S, in other words, f(x) counts only those integers between 1 and x whose prime factors all lie in set S. (ii) Lemma. f(x) 2 j x. Proof: n = p e 1 1 p e 2 2 p e j j (e i 0) = m 2 p ǫ 1 1 p ǫ 2 2 p ǫ j j (ǫ i = 0 or 1) There are at most x choices of m and 2 j choices of ǫ 1,ǫ 2,...,ǫ j. So f(x) 2 j x. (iii) Let π(x) = the number of primes in the interval 1 to x. Fix x a positive intger and let p 1,p 2,...,p j be the primes in order: 2, 3, 5, 7, 11,..., p j which are less than or equal to x. Let S = {p 1,p 2,p 3,...,p j }. π(x) = j f(x) = x By the lemma, f(x) = x 2 j x = 2 π(x) x Hence, x 2 π(x) Taking logs, 1 logx π(x)log2. 2 So, π(x) logx. 2log2 (iv) One consequence is another proof that there are infinitely many primes, since π(x) tends to infinity as x. (v) Start with π(x) logx. 2log2 Let x = p n (the n-th prime) π(x) = n n logpn 2log2 logp n 2nlog2 So p n 2 2n.

7 (vi) Theorem. n=1 1 p n =. Proof: Assume not. Let j be large enough so that 1 < 1 p n 2, that is, < 1 p j+1 p j+2 2 n=j+1 2. COUNTING THE PRIMES 7 Let S = {p 1,p 2,p 3,...,p j } f(x) 2 j x, for any positive integer x x f(x) = the number of integers between 1 and x which are divisible by some prime p t, t > j. The number of integers n, 1 n x, which are divsible by p is x. p That is, at most x p t integers between 1 and x are divisible by p t. x f(x) x + x + x + p j+1 p j+2 p j+3 ( 1 = x x f(x) x x f(x) 2 1 x 2j x 2 x 2 j+1 p j p j p j+3 + which is impossible, since x was arbitrary and j is fixed. c (vii) Since <, ǫ > 0, n1+ǫ n=1 it is false that 1 p n c for all n N. n 1+ǫ Therefore, p n 1 c n1+ǫ for all infinitely many n. (viii) It is known that p n nlogn. )

8

9 CHAPTER 2 Math 420 Number Theory Review 1. Divisors We begin with the definitions of two important sets in number thoery. Definition 2.1. The set of naturanl numbers is N = {1,2,3,4,5,...}. N is also called the set of positive integers. Definition 2.2. The set of integers is Z = {..., 3, 2, 1,0,1,2,3,4,...}. Question. Why do we use the letter Z for the set of integers, instead of I? Hint: Sprechen Sie Deutsch? 2. Divisibility Definition 2.3. Given integers a and b. We say that a divides b if and only if there exists an integer q such that aq = b. Equivalently we say a is a divisor of b or that b is a multiple of a. Notation: Write a b for a divides b and a b for a does not divides b. Example: 2 12, Here are some important facts about divisors: Theorem 9. Let a, b, and c be integers. (i) If a b and b c, then a c (ii) If a b, then a bc. (iii) If a b and a c, then a b+c. (iv) If a b and a c, then a b c. Based on your experience in Math 420, you should be able to prove the above theorem using the formal definition of divides. 9

10 10 2. MATH 420 NUMBER THEORY REVIEW Theorem #10. Let a and b 0 be integers. If a b, then a b. Comment: This last theorem states the obvious fact that a bigger number cannot possibly divide a smaller number (other than 0). For example, we do not need to check that 101 does not divide 17; it s too big to be a divisor. Just because the theorem is obvious does not mean that writing a correct proof is easy, as this problem demonstrates. Think of writing the proof as developing a firm grasp of the obvious. Question #11. What can you say about a b if (a) b = 0? (b) a = 0? (c) a = 1? 3. Congruences Definition 2.4. Given a positive integer n. We say that two integers a and b are congruent mod n, written a b (mod n) if and only if n a b. Note that the previous definition of divides is essential in making the definition of congruent (mod n). For example, (mod 9) because = 1224 = and (mod 12) because ( 11) = 24. Question 12. Answer each of the following: (a) Is 45 9 (mod 4)? (b) Is 37 2 (mod 5)? (c) Is 37 3 (mod 5)? (d) Is 37 3 (mod 5)? Question 13. Find the smallest non-negative integer r such that (a) ( ) r (mod 7) (b) 1000 r (mod 7) (c) 250 r (mod 33) Exercise 14. Characterize all integers n which satisfy the following congurences:

11 4. CONGRUENCE FACTS 11 (a) n 0 (mod 2) (b) n 1 (mod 2) Exercise 15. Characterize all integers n which satisfy the following congurences: (a) n 0 (mod 3) (b) n 1 (mod 3) (c) n 2 (mod 3) (d) n 4 (mod 3) 4. Congruence Facts Congruences ( ) act like equals (=). The relevant theorems fall into two separate categories: (1) basic properties and (2) arithemtical properties. The three basic properties of = are: (i) anything is equal to iteself; (ii) you can switch sides: a = b implies b = a; and (iii) you can connect a string of equations: a = b and b = c implies a = c. It turns out that congruence works in exactly the same way: Theorem #16. Let a, b, c and n > 0 be integers. Then (i) a a (mod n) (ii) a b (mod n) implies b a (mod n) (iii) a b (mod n) and b c (mod n) implies a c (mod n). This theorem shows that congruence mod n is an equivalence relation, that is, a relation which is (i) reflexive, (ii) symmetric, and (iii) transitive. The basic arithmetic properties of = are: you can add, subtract, or multiply equals to get equals, that is, if a = b and c = d, then a+c = b+d, a c = b d, and a c = b d. Analogous statements hold for congruences as well: Theorem #17. Let a, b, c, d and n > 0 be integers. If a b (mod n) and c d (mod n), then (i) a+c b+d (mod n) (ii) a c b d (mod n) (iii) a c b d (mod n). Division, as we will see later, requires more thought.

12 12 2. MATH 420 NUMBER THEORY REVIEW 5. Induction Principle of Induction. Let P(n) be a statement about the positive integer n. In order to show that P(n) is true for all positive integers n, it suffices to show that (i) First Case: P(1) is true; (ii) Next Case: If P(n) is true for the integer n, then statement P is true for the next integer n+1. Example: Find the sum of consecutive odd numbers. Let s experiment: 1 = = = = 16 Question: What is the pattern 1, 4, 9, 16? Answer: They are all squares. Question: Does this pattern continue for the next sum when n = 5? Answer: Let s check: = 16+9 = 25, another square. Conjectured Formula: (2n 1) = n 2 Geometric Proof: For example, when n = 5, we can decompose a 5 square into five L-shaped pieces whose areas are 1, 3, 5, 7, and Induction Proof: P(n) : (2n 1) = n 2

13 First Step: P(1) is true: 1 = 1 6. THE DIVISION ALGORITHM 13 Next Step: Assume P(n) is true and show that P(n+1) is also true. The idea is to start with the formula P(n). Add the next odd number 2(n+1) 1 to both sides, and hopefully transform the equation into P(n+1), like this: (2n 1) = n (2n 1)+(2(n+1) 1) = n 2 +2(n+1) (2n 1)+(2(n+1) 1) = n 2 +2n (2n 1)+(2(n+1) 1) = (n+1) 2 [P(n)] [add 2(n+1) 1] [algebra] [factoring]. This last equation is precisely P(n+1), the next case of the proposition we want to prove. By induction, P(n) is true for all positive integers. Exercise #18. Find a formula for the sum T = n These numbers are called triangular numbers. Do you see why? Use induction to prove the following theorem about congruences: Theorem #19. Let a, b, k, and n > 0 be integers. If a b (mod n), then a k b k (mod n). One interesting application of this theorem is that when working mod 9, all powers of 10 are congruent to one. That is, 10 1 (mod 9) implies 10 k 1 k = 1 (mod 9) for all exponents k. Use this fact to prove that the following divisibility test: Theorem #20. The number n is divisible by 9 if and only if the sum of the base 10 digits of n is divisible by 9. Problem #21. For each divisior d = 2,3,4,,11,12, devise a test to determine whether the number n written in decimal as is divisible by d. n = d t d t 1 d 3 d 2 d 1 d 0 6. The Division Algorithm Theorem. [Division Algorithm] Suppose a > 0 and b are integers. Then there is a unique pair of integers q and r such that b = aq +r where 0 r < a.

14 14 2. MATH 420 NUMBER THEORY REVIEW The number q is called the quotient and r is called the remainder. Example: b = 23 and a = 7. Here 23 = 3 7+2, so q = 3 and r = 2. In grade school you would have said 7 goes into 23 three times with a remainder of two. When you learned about fractions (in the fourth grades), you wrote 23 7 = 3 2. Observe also 7 that the restriction that the remainder r lies in the range 0 r a 1 is essential for uniqueness. For example, it is true that 23 = 2 7+9, but we cannot use r = 9 as a remainder because it is larger than the divisor 7; given b = 23,a = 7, the only values of q and r satisfying 23 = 7q +r, 0 r 6 are 3 and 2, respectively. In proving the division algorithm it is convenient to aasume that n is positive and that the divisor is greater than 1. Question #23. What are the values of q and r if a = 1? Exercise #24. Verify the division algorithm for n > 0 and d > 1 by induction on the variable b. Hint: the idea is simply to show that if the division algorithm holds for a positive integer n, then it also holds for n+1. This will require you to consider two separate cases, based on the size of r. Exercise #25. Once you know the division algorithm holds for positive integers, how can you extend the theorem to negative integers? Exercise#26. Prove the uniqueness part of the Division Algorithm. That is, prove that the integers q and r are unique, which means that if (q 1,r 1 ) satisfies b = q 1 a+r 1, 0 r 1 < a and (q 2,r 2 ) also satisfies b = q 2 a + r 2, 0 r 2 < a, then q 1 = q 2 and r 1 = r 2. The next theorem shows a connection between the division algorithm and congruences. Theorem #27. Let a, b, and n > 0 be integers. Then a b (mod n) if and only if a and b have the same remainder when divided by n. Exercise #28. Use congruences to find the following remainders: (a) when is divided by 7 (b) when is divided by 11 (c) when is divided by 7

15 8. THE PAILS OF WATER PROBLEM Mod n Tables Here are the addition and multiplication tables, when the remainders are reduced modulo 5: Let s examine the times table. The zero row and zero column consists of all 0 s. What did we expect? Zero times anything is zero. If we ignore the 0 row and column, the rest of the times table has some interesting properties. Notice, for example, the numbers 1, 2, 3, and 4 are scrambled when we multiply by 2, 3, or 4. That is, each of the rows list the numbers 1, 2, 3, 4 in some order. In the second row we get 2, 4, 1, 3; in the third row we get 3, 1, 4, 2; in the last row the numbers are backwards 4, 3, 2, 1. This scrambing phenomenon is the key idea in constructing the secret codes discussed in a future section. Problem #29. Construct the + and tables mod 7. Problem #30. Construct the + and tables mod The Pails of Water Problem You have a 5 and a 7 quart pail. How can you measure exactly 1 quart of water, by pouring water back and forth between the two pails? You are allowed to fill and empty each pail as many times as needed. [Try to solve this problem before reading further!] After a bit of trial and error, you will discover that one solution there are others! is to fill the 5-quart pail three times and empty into the 7-quart pail twice. This method given can be written more succicntly as: = 1. The general Pails of Water Problem is: Given integers a and b, find numbers m and n such that ma+nb = 1.

16 16 2. MATH 420 NUMBER THEORY REVIEW Let s say that a is smaller than b. If you can t think of the solution right away because the numbers are too large, reduce the problem to two smaller numbers, by dividing the smaller number a into b, getting a quotient q and a remainder r. Write this as r = b q a. Record this equation as you will need it later. The original POW problem a and b reduces to solving POW with the numbers r and a. You can write this reduction as (a,b) (r,a). If the numbers r and a are still too big, reduce again, by dividing r into a. Eventually you will reach two numbers that you can do in your head. Starting with this easy solution, carefully work backwards, substituting the remainder equations you previously recorded, until you reach a solution using the original numbers a and b. Example. Solve the Pails of Water Problem (POW) with the numbers 100 and 77. Solution: First, wedivide77into100. Since77goesinto100onetime, withremainder 23, we write 23 = and record this equation for later use. Now we have reduced the POW problem to the numbers 77 and 23. But these numbers are still too big; it is not obvious how to get 1 from the numbers 77 and 23. So we reduce again. The smaller number 23 goes into 77 three times, with remainder 8. Write this as 8 = 77 3(23). Can we solve POW with 23 and 8? Yes! = 1. Now we substitute the previous remainder equations to work our way back to the original numbers 100 and 77: 1 = 3(8) 23 solution with 8 and 23 = 3(77 3(23)) 23 substitute 8 = 77 3(23) = 3(77) 9(23) 23 expand the first parentheses = 3(77) 10(23) gather the 23 s together = 3(77) 10(100 77) substitute 23 = = 3(77) 10(100) + 10(77) expand the second parentheses = 13(77) 10(100) gather the 77 s together.

17 9. GREATEST COMMON DIVISOR 17 We can easily check our solution = 1 with a calculator: = 1001 and we know (without a calculator) that = The method described in this section for solving the pails of water problem is called the Euclidean algorithm. This particular procedure dates back over two thousand years ago to the Greek mathematician Euclid, who also founded plane geometry. We will develop a more automatic method using continued fractions in the next section. Question 32. You cannot obtain 1 quart of water with 6 and 10 quart pails. Why not? What is the smallest amount you can obtain? Question 33. Solve POW in your head: (a) 10 and 19; (b) 7 and 9; (c) 11 and 8 Question #34. Another solution with 5 and 7 is: = 1. Show how to get this solution from the solution = 1. Hint: add and subtract 5 7. Question 35. Solve POW with (a) 31 and 9 (b) 54 and 37. (c) 2519 and 377 (d) make up your own problem 9. Greatest Common Divisor Definition 2.5. Suppose d a and d b. Then d is called a common divisor of a and b. Example: Common divisors of 14 and 18 are ±1, ±2. Question #36. Does any pair of integers a and b always have at least one common divisor? Question #37. If you know that a and b have infinitely many common divisors, what must be true about a and b? Definition 2.6. If a and b are not both 0, then the largest positive common divisor g of a and b is called the greatest common divisor of a and b. Notation: Write d = gcd(a,b) or just g = (a,b).

18 18 2. MATH 420 NUMBER THEORY REVIEW Example: gcd(14, 18) = 2. Exercise 38. Find the greatest common divisor of (a) 36 and 22 (b) 100 and -30. (c) 15 and 28 (d) 0 and 28 Notation: When gcd(a,b) = 1 we say that a and b are relatively prime or that a is relatively prime to b. Another way of saying this is to assert that a and b share no common factors. Example. 144 and 35 are relatively prime, while 21 and 35 are not. Theorem #39. (i) If a 0 and b and q are integers, then the common divisors of a and b are the same as the common divisors of a and b+qa. (That is, d is a common divisor of a and b if and only if d is a common divisor of a and b+qa.) In particular, (a,b) = (a,b+qa). (ii) If a 0 and b = qa+r, then (a,b) = (a,r). Using the previous theorem and succesive applications of the Division Algorithm until we reach a remainder of zero provides a method for computing the gcd of a and b. Exercise 40. Compute (12471, ). Exercise 41. Compute (12345, 67890). If your method reminds you of the POW problem, you are not having an out-ofbody deja-vu experience. The method for find gcd s and the method for solving POW are essentially the same technique. Both are called the Euclidean Algorithm. (The POW method is sometimes called the extended Euclidean Algorithm.) Question 42. Back to the pails of water problem. What do you think is the smallest amount of water you can obtain from pails of size a and b? Exercise #43. Find integers x and y such that 12345x+67890y = (12345,67890).

19 CHAPTER 3 Continued Fractions 1. Finite Continued Fractions Definition. A simple continued fraction has the form q 0 + q 1 + q q n q n Note that the numerators are always 1. The q s are called the partial quotients of the continued fraction. Notation. We use square brackets to denote the above continued fraction. Example. Evaluate [q 0,q 1,q 2,...,q n ] In computing the value of the continued fraction above, you must work from right to left, first simplifying 1+ 1 = 5, next simplifying 3+ 4 = 19, and so on, working your way to the left. As it turns out, it is easier to evaluate continued fractions by working from left to right. 19

20 20 3. CONTINUED FRACTIONS Definition. If 0 k n, then the kth convergent of the continued fraction [q 0,q 1,...,q n ] is the fraction A k B k = [q 0,q 1,...,q k ], obtained by truncating the original continued fraction at the kth partial quotient. We always express A k B k in lowest terms Example. Evaluate the convergents A 0 B 0, A 1 B 1, A 2 B 2, A 3 B 3 of [2,3,1,4]. A faster way is to work from left to right, using the following recursion formulas. Theorem 3.1. The Recursion Theorem { { A 2 = 0 A 1 Starting with the values B 2 = 1 and = 1 B 1 = 0, the convergents A k and B k can be computed from the previous two values A k=1,a k 2 and B k=1,b k 2 : A k = q k A k 1 +A k 2 B k = q k B k 1 +B k 2. Example. Use these formulas to evaluate the convergents of [2,3,1,4]. q k A k B k Theorem 3.2. The Cross-multiply theorem For k 1, A k 1 B k A k B k 1 = ( 1) k. Corollary 3.1. If the q s are integers, then so are A k and B k. Moreover, gcd(a k,b k ) = 1. Corollary 3.2. A k A k 1 B k B k 1 = 1 B k 1 B k Problem. Expand as a continued fraction. What s the point? The Cross Multiply Theorem shows how to solve the Pails of Water Problem. Given two numbers a and b

21 1. FINITE CONTINUED FRACTIONS 21 Example. Solve POW(43,19). First express 43 as the continued fraction [2,3,1,4]. 19 Now compute the last and next to last convergent: By the Cross-Multiply Theorem, or or A 2 B 2 = 9 4 and A 3 B 3 = A 2 B 3 A 3 B 2 = ( 1) = = 1. This equations solves POW(43,19): fill the 43-quart pails 4 times and empty into the 19-quart pail 9 times. Exercises: #44. Prove the Recursion Theorem. Hint: [q 1,q 2,...,q k 1,q k ] = [q 1,q 2,...,q k q k ]. #45. Prove the Cross-multiplication Theorem. #46. Prove Corollary 3.1. #47. Prove Corollary 3.2. #48. Find a solution to the Diophantine equation 417x 172y = 1. #49. When you write 15 as a continued fraction, and then evaluate the convergents, 9 what is the final convergent? It s not 15. Why not? Explain how you could use the 9 final convergent to determine gcd(15,9). #50. Use the continued fraction expansion of to find d = gcd(12345,67890) Find a solution in integers to the equation 12345x+67890y = d. #51. Show that A k B k A k 2 B k 2 = ( 1)k q k B k B k 2 #52. Suppose a b = [q 0,q 1,q 2,...,q k ] and that all the partial quotients q i are positive. Show that A k A k 1 = [q k,q k 1,...,q 2,q 1,q 0 ]

22 22 3. CONTINUED FRACTIONS and B k B k 1 = [q k,q k 1,...,q 2,q 1 ]. #53. The Fibonacci sequence {0,1,1,2,3,5,8,13,21,34,...} is defined recursively by F 0 = 0, F 1 = 1, and for n 2, F n = F n 1 +F n 2. What is the continued fraction expansion of F n /F n 1? The next two exercises pave the way into the next section on infinite continued fractions. #54. What number has the infinite continued fraction expansion #55. What is the continued fraction expansion of π = ?

23 2. INFINITE CONTINUED FRACTIONS Infinite Continued Fractions Given a non-terminating simple continued fraction 1 q q 1 + q We define the value of this continued fraction to be the limit of the convergents A n lim n B n Theorem 3.3 (Alternating Series Test). If the alternating series ( 1) k 1 b k = b 1 b 2 +b 3 b 4 + k=1 satisfies the conditions (i) b k > 0 (ii) b k 1 > b k and (iii) lim n b k = 0, then the series converges. Theorem 3.4. If q i 1 for i 1, (integers or not), then the simple continued fraction [q 0,q 1,q 2,...] converges. Exercises: Exercise #56. Prove Theorem 3.4. Hint: Use the Cross-Multiplication Theorem to write A n n = q 0 + ( 1) k 1 1. B n B k B k 1 k=1 Use the Alternating Series Test to prove that q 0 + #57. Show that the even numbered convergents k=1 { A2k B 2k ( 1) k 1 1 B k B k 1 converges. } form an increasing sequence.

24 24 3. CONTINUED FRACTIONS { A2k+1 #58. Show that the odd numbered convergents #59. Show that for any m and k, A 2k B 2k < A 2m+1 B 2m+1. B 2k+1 } form a decreasing sequence. #60. Prove that if x is the irrational number whose continued fraction representation is [m,m,m,...], then x = 1 2 m+ m #61. Prove that if x = [a 0,a 1,a 2,...], where a 0 1, then 1 x = [0,a 0,a 1,a 2,...].

25 3. QUADRATIC IRRATIONALS - A DETAILED EXAMPLE Quadratic Irrationals - a Detailed Example Consider the following quadratic irrational: α = One can check that α satisfies the quadratic polynomial ( x )( x ) = x x = x 2 10x Clearing fractions by multiplying through by 2, we see that α is a root of the polynomial 2x 2 5x+1 and indeed the quadratic formula applied to this polynomial yields the original value of α. Now suppose we want to find the continued fraction expansion of α = (P )/Q0 = (5+ 17)/4. The first partial quotient is q 0 = = 2 4 since 4 < 17 < 5. Our first iteration is ( 5+ ) 17 α = 2+ 2 = 2+ 4 where α 1 = = = 2+ 1 α 1 ( 5+ ) Rationalizing the denominator, we get 17 α 1 = = 4( 17+3) 17 9 = 4( 17+3) 8 =

26 26 3. CONTINUED FRACTIONS Notice that we were lucky in the step where the 4 in the numerator divided into the 8 in the denominator, leaving α 1 in the form α 1 = P = Q 1 2 We repeat this process to get the next partial quotient: q 1 = = 3 2 and α 1 = 3+ ( 3+ ) 17 3 = 3+ 2 Computing the value of the reciprocal, α 2 = = 2( 17+3) 17 9 = ( ) 17 3 = α 2 = 2( 17+3) 8 = P Q 2 and, once again, a small miracle happened when the 2 divided into the 8. Our third partial quotient is q 3 = = 1 4 and α 2 = 1+ ( 3+ ) 17 1 = 1+ 4 Computing the value of the reciprocal, α 3 = = 4( 17+1) 17 1 = 4( 17+1) 16 = ( ) 17 1 = α 3

27 3. QUADRATIC IRRATIONALS - A DETAILED EXAMPLE 27 Our fifth iteration gives q 4 = = 1 4, ( 1+ ) ( ) α 3 = 1+ 1 = 1+ = α 4 4 But we have seen this baby before: α 1 =. So α 4 = α 1 and the next three 17 3 partial quotients will be 3, 1, and 1, the same as the partial quotients for α 1. Let s summarize what we found. At each stage, starting with α 0 = α, we found that and that The values are α k = P k + 17 Q k α k = q k + 1 α k+1. k q k P k Q k Thus the continued fraction expansion of α is α = = [2,3,1,1] 4 where the line drawn over the sequence 3,1,1 indicates that these three quotients keep repeating.

28 28 3. CONTINUED FRACTIONS 4. Quadratic Irrationals - The General Situation Let us generalize the previous example to quadratic irrationals of the form α = r + s d, where r and s are rational numbers. We assume that d is not a perfect square, otherwise α would not be irrational. As in the example, α is a root of the polynomial (x (r+s d))(x (r s d)) = x 2 2rx+(r 2 ds 2 ). We can multiply by the lcm of 2r and r 2 ds 2 to obtain a polynomial ax 2 +bx+c which has α for one of its roots. By the quadratic formula, these roots are b+ b 2 4ac b b 2 4ac. 2a 2a We can always assume that α will be the choice with the plus sign. If not, just multiply all three coefficients a, b, and c by 1 and note that Thus α can be written where It follows immediately that b+ b 2 4ac 2a = b b 2 4ac. 2a α = P + D Q P = b, Q = 2a, D = b 2 4ac. P 2 D = 4ac = 2Qc. Now at each step in computing the continued fraction expansion of α we find that P k + D q k = Q k and α k = q k + 1. α k+1 Subtracting the partial quotient gives or α k q k = P k + D Q k q k = 1 α k+1 = P k q k Q k + D Q k = Q k+1 P k+1 + D. 1 P k+1 + D Q k+1

29 Cross multiply to get 4. QUADRATIC IRRATIONALS - THE GENERAL SITUATION 29 Now FOIL the product on the left: (P k q k Q k + D)(P k+1 + D) = Q k Q k+1. (P k q k Q k )P k+1 Q k Q k+1 +D+(P k q k Q k +P k+1 ) D = 0. Since D is not a perfect square, we must have (P k q k Q k )P k+1 Q k Q k+1 +D = 0 P k q k Q k +P k+1 = 0. The second equation gives us a recursion formula for P k+1 : P k+1 = q k Q k P k Plugging this expression into the first equation above gives Replacing k by k 1 gives P 2 k+1 +Q k Q k+1 = D. P 2 k +Q k 1 Q k = D. Equating these two expressions on the left gives P 2 k+1 +Q k Q k+1 = P 2 k +Q k 1 Q k. Plugging in our formula for P k+1 and rearranging terms, we have Q k Q k+1 = P 2 k +Q k 1 Q k P 2 k+1 = P 2 k +Q k 1 Q k (q k Q k P k ) 2 Now divide through by Q k to obtain = P 2 k +Q k 1 Q k q 2 kq 2 k +2q k Q k P k P 2 k = Q k 1 Q k q 2 kq 2 k +2q k Q k P k Q k+1 = Q k 1 q 2 kq k +2q k P k = Q k 1 +q k (P k (q k Q k P k )) = Q k 1 +q k (P k P k+1 ) This gives us a recursion for calculating Q k+1 : Q k+1 = Q k 1 +q k (P k P k+1 ) Notice that these recursive formulas eliminate the need to rationalize the denominators or to perform any divisions in computing the continued fraction expansions of the quadratic irrational α. They also supply an easy induction proof that at the kth stage, P k and Q k are both integers, provided we can show that Q 1 is an integer.

30 30 3. CONTINUED FRACTIONS To see that Q 1 is an integer, use the formula with k = 1: P 2 k +Q k 1 Q k = D P 2 1 +Q 0 Q 1 = D. Since P 1 = q 0 Q 0 P 0, the above equation becomes Q 1 = D P2 1 Q 0 = D (q 0Q 0 P 0 ) 2 Q 0 = D (q 0Q 0 P 0 ) 2 Q 0 = D (q2 0Q 2 0 2q 0 P 0 Q 0 +P 2 0) Q 0 = D P2 0 Q 0 +2q 0 P 0 q 2 0Q 0 = 2c+q 0 (P 0 P 1 ), where c is the constant term of the quadratic polynomial with integer coefficients satisfied by α. (1) (2) (3) (4) Summary of our recursion formulas: P k+1 = q k Q k P k P 2 k +Q k 1 Q k = D Q k+1 = Q k 1 +q k (P k P k+1 ) Q 1 = 2c+q 0 (P 0 P 1 ) Note that for k = 1, formula (2) yields (4) if we define (5) Q 1 = 2c

31 4. QUADRATIC IRRATIONALS - THE GENERAL SITUATION 31 TI-83 program to compute the continued fraction expansion of (P + sqrt(d)) / Q This quadratic irrational must come directly from applying the quadratic formula to a x^2 + bx + c PROGRAM: CFRAC :Prompt A,B,C :-B->P :2*A->Q :B^2-4*A*C->D :-2*C->G :Lbl L :ClrHome :int((p+sqrt(d))/q)->a :Disp P,Q,A :Pause :A*Q-P->R :G+A*(P-R)->S :Q->G :R->P :S->Q :Goto L

32 32 3. CONTINUED FRACTIONS Exercises: #62. Given a quadratic irrational α, our method requires us to find a polynomial ax 2 + bx + c with integer coefficients which α satisfies. Show that we can relax these conditions slightly, by allowing the polynomial satisfied by α to have the form a 2 x2 +bx+ c, where a and c are integers, and b is an even integer. That is, for such 2 polynomials, the values of D, P k, and Q k always turn out to be integers. What are the values of a, b, c for (a) (b) α = (c) α = 7 #63. For each of the following numbers, find their (periodic) continued fractions. (It will be useful to use the calculator program CFRAC on the previous page.) What is the period? (a) (b) (c) (d)

33 5. LAGRANGE S THEOREM Lagrange s Theorem Our goal here is to prove a very famous theorem about the periodic continued fractions. Theorem 3.5 (Lagrange). The continued fraction expansion of an irrational real number α eventually begins to repeat if and only if α = P+ D, where D is not a Q perfect square and P and Q are integers. We prove the if part of this theorem. Let α be a quadratic irrational which satisfies a polynomial ax 2 +bx+c with integer coefficents, so that α = P 0+ D Q 0, where P 0 = b, D = b 2 4ac, and Q 0 = 2a. In the last section we saw that (6) (7) (8) P k+1 = q k Q k P k P 2 k +Q k 1 Q k = D Q k+1 = Q k 1 +q k (P k P k+1 ) We will need the following lemma, whose proof we postpone. Lemma 3.1. Eventually Q k is positive, that is, there is an integer k 0 such that for all k k 0, Q k > 0. By equation (2), if k k 0 (from the lemma), then Moreover, so 0 < Q k Q k Q k+1 = D P 2 k+1. 0 < Q k < D. P 2 k+1 < D, D < P k < D. It follows that the pair of integers (P k,q k ) must eventually repeat at some point, since there are only finitely many possiblities. Inordertoprovethelemmaweneedto review somebasicfactsaboutquadratics conjugates. First, the quadratic conjugate of α = r+s d, where r and s are rational numbers and d is not a perfect square is α = r s d. Here are some well-known facts about conjugates which you are asked to prove in the homework: α. Fact 1. If α satisfies f(x) = ax 2 +bx+c, where a,b,c are integers, then so does

34 34 3. CONTINUED FRACTIONS Fact 2. α+β = α+β. Fact 3. α β = α β. Fact 4. If α Q, then α = α. To prove the lemma, we need to investigate the form of the kth convergent A k B k = [q 0,q 1,q 2,...,q k ]. Weknowthatα = [q 0,q 1,q 2,...,q k 1,α k ]. sotherecursionformulas give α = A k 2 +α k A k 1 B k 2 +α k B k 1. We can solve this equation for α k : α(b k 2 +α k B k 1 ) = A k 2 +α k A k 1 αb k 2 +αα k B k 1 = A k 2 +α k A k 1 α k (αb k 1 A k 1 ) = A k 2 αb k 2 α k = A k 2 αb k 2 αb k 1 A k 1 Taking the congugate of this equation yields α k = A k 2 αb k 2 αb k 1 A k 1. This last equation can be rewritten A k 2 B k 2. B k 1 α k = B α k 2 B k 1 α A k 1 We know that the limit α A k 2 B lim k 2 = α α k α A k 1 α α = 1. B k 1 Since B n > 0 for all n, it follows that eventually α k will be negative. More precisley, there is a number k 0 so large that if k k 0, then α k < 0. Now α k is positive, starting with n = 1. So for values of k k 0, we have Hence Q k > 0 for k k 0. 0 < α k α k = 2 D Q k.

35 5. LAGRANGE S THEOREM 35 Exercises: #64. Find the value of each of the following periodic continued fractions. Express your answer in the form P+ D, where P, D, and Q are integers. Q (a) [1,2,3] (b) [1,1,2,3] (c) [1,1,1,3,2] (d) [3,,2,1] (e) [1,3,5] (f) [1,2,1,3,4] #65. Prove Facts 1 4 about quadratic conjugates. #66. Determine the relationship between the continued fraction expansion of α = P+ D and its conjugate α = P D. Q Q #67. Express a purely periodic continued fraction β = [b 0,b 1,...,b m ] as a quadratic irrational, that is, show β satisfies an equation of the form ax 2 +bx+c where a, b, and c are integers. Hint: Use the fact that β = [b 0,b 1,...,b m +1/β]. #68. Express a periodic continued fraction α = [a 0,a 1,...,a n,b 0,b 1,...,b m ] as a quadratic irrational. Hint: Write α = [a 0,a 1,...,a n,β], where β = [b 0,b 1,...,b m ] is purely periodic.

36 36 3. CONTINUED FRACTIONS 6. Continued Fraction Worksheet (a) For each number in the table below, fill in the values of the continued fraction of n. D CFRAC D D CFRAC D D CFRAC D D CFRAC D

37 6. CONTINUED FRACTION WORKSHEET 37 (b) Looking for patterns. (i) At what index does the repeating part begin? (ii) Is the period always even; always odd; or sometimes even and sometimes odd? (iii) Can you predict the value of the last entry in the period? (iv) Is the denominator Q k ever 1? If so, when? (v) Does the set of partial quotients in a period have any symmetries? (c) General Formulas Do you notice any patterns for the continued fraction expansion of numbers of the form (i) m 2 +1? (i) m 2 1? (i) m 2 +2? (i) m 2 2? (d) Pell s Equation is the equation where D is not a perfect square. x 2 Dy 2 = ±1 Compute the convergents for 10 of these continued fractions. For each convergent of A k B k of D, compute A 2 k DB2 k. What do you notice? Do you spot any solutions to Pell s equation?

38 38 3. CONTINUED FRACTIONS 7. Three Important Theorems The next theorem states that the convergents of the continued fraction expansion of an irrational number give the best possible rational approximations. Theorem 3.6 (The Approximation Theorem). Let α be an irrational number whose continued fraction expansion is α = [q 0,q 1,q 2,...]. Let A k B k be the k-th convergent of this continued fraction. (a) If r and s are integers with s > 0 and sα r < B k α A k, then s B k+1. (b) The fraction A k is closer to α than any other rational with denominator less than B k or equal to B k. (c) α r < 1 s 2s 2, then r must be a convergent of the continued fraction expansion s of α. The next two theorems were suggested by the D worksheet. Theorem 3.7 (C.F. Expansion of d). The continued fraction of d has the form [q 0,q 1,q 2,...,q m 2,q m 1,2q 0 ] where q i = q m i for 1 i m 2. Theorem 3.8 (Solution to Pell s Equation). Suppose that d is a positive nonsquare and that m is the period of the continued fraction expansion of d, where A k B k denotes the k-th convergent. (a) The smallest solution to the Pell equation x 2 = dy 2 = ±1 is x = A m 1 and y = B m 1. (b) If m is even, this is a +1 solution and there are no 1 solutions. (c) If m is odd, this is a 1 solution and there are both +1 and 1 solutions. (d) Solutions beyond the first occur at the convergents x = A k and y = B k, where k = 2m 1, 3m 1, etc.

39 7. THREE IMPORTANT THEOREMS 39 Exercises: #69. Evaluate the continued fraction expansion of the numbers (a) e 1 e+1 ; (b) ; (c) e itself. e+1 e 1 To fifty digits, e = e 1 e+1 = e+1 e 1 = Do you see the pattern for these three numbers? Compute the first ten convergents of each of these continued fraction expansions and show that they satisfy the Approximation Theorem. #70. Prove that if d 3 (mod 4) and d is not a square, then there is no solution in integers to x 2 dy 2 = 1. #71. Find (periodic) continued fractions α = [a 0,a 1,a 2,...] and β = [b 0,b 1,b 2,...] and determine the product γ = [a 0 b 0,a 1 b 1,a 2 b 2,...].

40

41 CHAPTER 4 Diophantine Questions 1. Perfect Numbers First, some notation. let σ(n) = d n d, the sum of all (positive) divisors of n. Let σ denote the funtion σ (n) = d, d n d<n the sum of all positive divisors less than n. Show that the following facts are true: Fact 1: σ(n) = σ (n)+n Fact 2: n is perfect if and only if σ(n) = 2n. Fact 3: If q is odd and a 1 then σ(2 a q) = ( a )σ(q) = (2 a+1 1)σ(q). Theorem 4.1. Let n be an even perfect number. Then n = 2 a (2 a+1 1), where a 1 and 2 a+1 1 is prime. Proof. Let 2 a be the highest power of 2 which divides n. Since n is even, a 1. Write n = 2 a q, where q is odd. Since n is perfect, Facts 1, 2, and 3 give us This implies 2 a+1 q = 2n = σ(n) = σ(2 a q) = (2 a+1 1)(q +σ (q)). (9) q = σ (q)(2 a+1 1) so 2 a+1 1 divides q. Write q = (2 a+1 1)q 1. 41

42 42 4. DIOPHANTINE QUESTIONS Equation (9) becomes (10) q 1 = σ ( (2 a+1 1)q 1 ). Now q 1 is a divisor of q and we know q 1 < q since a 1 = 2 a If q 1 > 1, then both 1 and q 1 are counted in the sum σ (q) and so equation (10) leads to the contradiction q 1 1+q 1. The only escape from this contradiction is to have q 1 = 1. Thus, q = 2 a+1 1 and σ (q) = 1, which implies that the only divisor of q less than itself is 1, or equivalently, that q is prime. #72. Show that in Theorem 4.1 a+1 must be prime. Equivalently, show that if m is composite, then 2 m 1 is also composite. #73. A pair (a,b) of positive integers is called an amicable pair of numbers if and only if σ (a) = b and σ (b) = a, where σ (n) = the sum of the divisors of n which are less than n. Show that (220, 284) is an amicable pair. Can you find any other examples?

43 2. FERMAT S METHOD OF DESCENT Fermat s Method of Descent Pierre de Fermat( ) is often called the father of modern number theory. Considering his importance in many areas of mathematics, he was unusual in two ways: he was an amateur and he published very few of his results. His day job was royal councillor at the Parliament of Toulouse. Had he done nothing besides giving legal advice to the court, he would not be remembered today. Happily, he spent much of his leisure time his day job paid well absorbed by mathematical problems. One of Fermat s favorite techniques for proving statements in number theory was his method of infinite descent. We shall illustrate Fermat s descent method in the proof of the following well known fact. Theorem 4.2. The square root of 2 is irrational. Proof. (by Descent) Suppose 2 is, contrary to what you might have learned in high school, a rational number. Then there are positive integers a and b such that a b = 2. Multiplying by b and squaring both sides gives a 2 = 2b 2. The method of our proof is to show that no matter how small the positive integers a and b are, we can always find another solution A 2 = 2B 2, where A and B are positive integers and A is smaller than a. Observe that We may substitute a 2 for 2b 2 to get b 2 < 2b 2 < 4b 2. b 2 < a 2 < (2b) 2. Since b, a, and 2b are all positive integers, we are justified in taking the square root of this inequality, to get the following important result: (*) b < a < 2b. Take We wish to show the following four facts: A = 2b a and B = a b. Fact 1. A > 0. (*) = 2b > a = 2b a > 0 = A > 0. Fact 2. B > 0. (*) = a > b = a b > 0 = B > 0.

44 44 4. DIOPHANTINE QUESTIONS Fact 3. A < a. (*) = b < a = 2b < 2a = 2b a < a = A < a. Fact 4. A 2 = 2B 2. Plugging A = 2b a and B = a b into A 2 2B 2 gives A 2 2B 2 = (2b a) 2 2(a b) 2 = (4b 2 4ab+a 2 ) 2(a 2 2ab+b 2 ) = 4b 2 4ab+a 2 2a 2 +4ab 2b 2 = 2b 2 a 2 = 0. We did it! Both A and B are positive integers, A 2 = 2B 2, and A is smaller than a. If we repeat this procedure, this time with (A,B) taking the place of (a,b), then we will find yet another pair call it (A 2,B 2 ) where A 2 is a positive integer less than A and satisfying A 2 2 = 2B2. 2 The problem is that we cannot continue to find smaller and smaller positive integers which are all less than a. Otherwise there would be infinitely many positive integers less that a which is absurd. The whole mess started from our initial assumption that 2 is a rational number. This assumption must wrong and 2 must be an irrational number. It is interesting to compare this proof with the standard proof usually seen (if not remembered) in high school or standard algebra text books. Proof. (Standard) Suppose 2 is a rational number a b. Then a b = 2 = a 2 = 2b 2. Write a and b as a product of the same list of primes, using p 1 = 2 as the first prime in the list: a = 2 e 1 p e 2 2 p er r b = 2 f 1 p f 2 2 p fr r where the exponents e i,f i are 0. Then the equation a 2 = 2b 2 becomes 2 2e 1 p 2e 2 2 p 2er r = 2 2f 1+1 p 2f 2 2 p 2fr r. By the uniqueness of prime factorization, we must have 2e 1 = 2f 1 +1, but this is impossible since 2e 1 is even and 2f 1 +1 is odd.

45 2. FERMAT S METHOD OF DESCENT 45 #74. Use the descent method to show that 3 is irrational. The idea is to follow the proof for 2: Assume a 2 = 3b 2, where a and b are positive integers, and then define A = 3b a, B = a b. #75. What happens if we try to use the method in Exercise 1 above to show that 4 is irrational?

46 46 4. DIOPHANTINE QUESTIONS 3. Sums of Squares Lemma 4.1. Let p > 2 be a prime and suppose a 0 (mod p). Then there are small numbers s and t such that where 0 < s < p and 0 < t < p. sa t (mod p), Proof. We use a counting argument. Let k = p. That is, k is the integer satisfying 1 k < p and k +1 > p. Consider the (k + 1) 2 ordered pairs (α,β) where α = 0,1,2,...,k and β = 0,1,2,...,k. With each pair (α,β) associate the number αa+β. Since (k +1) 2 > p, there must be two different pairs (α 1,β 1 ) (α 2,β 2 ) such that Take s = α 1 α 2 and t = β 1 β 2. Then and the other conditions are satisfied: α 1 a+β 1 α 2 a+β 2 (mod p) = (α 1 α 2 )a β 1 +β 2 (mod p). sa t (mod p) s = α 1 α 2 k < p t = β 1 β 2 k < p. Finally, if one of s,t is zero, then so is the other; but s and t cannot both be zero since (α 1,β 1 ) (α 2,β 2 ). Theorem 4.3 (Fermat). If p 1 (mod 4), then p = a 2 + b 2 is the sum of two squares. Proof. Solve a 2 1 (mod p) (using Wilson s Theorem). Now let s and t satisfy the conditions of the lemma: Then (i) sa t (mod p) and (ii) 0 < s 2 < p, 0 < t 2 < p. s 2 a 2 s 2 (mod p)

47 or equivalently Note that 3. SUMS OF SQUARES 47 t 2 +s 2 0 (mod p). 0 < s 2 +t 2 < 2p. The only multiple of p which lies strictly between 0 and 2p is the number p itself. #76. Suppose p is a prime and the congruence x (mod p) has a solution x. (This will happen when p 3 (mod 8) as we shall see later.) Show that a 2 +2b 2 = p has a solution (a,b). The next question is to ask whether a given number n can be written as a sum of squares. The following formula shows that if n 1 and n 2 can be written as a sum of two squares, then so can the product n 1 n 2 : (a 2 +b 2 )(c 2 +d 2 ) = (ac bd) 2 +(ad+bc) 2 If n = m 2 l (n,m,l are positive integers) and l is not divisible by the square of a prime, then l is called the square-free part of n. #77. Show that a positive integer n is the sum of two squares if and only if the square-free part of n is divisible by no prime of the form 4k +3. #78. Write n = as a sum of two squares. #79. Show that n = 4 m (8k+7), where k and m are nonnegative integers, cannot be written as a sum of 3 squares. Theorem 4.4 (Lagrange). Every positive integer is the sum of 4 squares. To find the values of a and b, let x 0 satisfy x (mod p). Carry out the Euclidean algorithm on p/x 0, producing a sequence of remainders r 1,r 2,..., to the point wehre r k is less than p. Then p = r 2 k +r 2 k+1 if r 1 > 1, otherwise p = x Note x 0 = c (p 1)/4, where c is a quadratic non-residue mod o. It turns out that you can use c = 2 when p 5 (mod 8) and c = 3 when p 17 (mod 24). The remaining case p 1 (mod 24) can be handled by quadratic reciprocity (to be discussed later).

48 48 4. DIOPHANTINE QUESTIONS Example. p = Notice p 1 (mod 24) is the hard case. By manipulation we find that c = 11, 13, and 17 are all quadratic non-residues. The power Now 11 (p 1)/4 = (mod 1009) = = = = =

49 CHAPTER 5 Congruences and Polynomials Suppose f(x) = a 0 +a 1 x+a 2 x 2 + +a s x s where the a i s are integers. Consider the polynomial congruence (11) f(x) 0 (mod m). An integer u is a solution to (11) means f(u) 0 (mod m). Note that if u 0 is a solution to (11), then so is any u, where u u 0 (mod m), because u u 0 (mod m) implies f(u) f(u 0 ) (mod m). By the number of solutions to congruence (11) we mean the number of solutions from any complete residue system mod m. By a complete set of solutions to (11) we mean any set u 1,u 2,...,u t of solutions such that (i) u i u j (mod m) for i j and (ii) every solution to (11) is congruent mod m to one of the u i. Example 1. x (mod 5) 2, 3 form a complete set of solutions The number of solutions is 2. Example 2. x (mod p), where p is prime. This congruence has a solution if and only if p = 2 or p 1 (mod 4). If u and v are solutions, then either u v (mod p) or u v (mod p). 49

50 50 5. CONGRUENCES AND POLYNOMIALS 1. Linear Congruences ax b mod m Theorem 5.1. If (a,m) = 1, then the congruence ax b mod m has exactly one solution modulo m. #80. Prove the above theorem. #81. Example 3. Solve 3x 50 (mod 113) Note that ax b (mod m) implies ax = b + qm for some integer q. So a common divisor of a,m also divides b. Example 4. 5x 1 (mod 15) is not solvable. Theorem 5.2. Consider the congruence ax b (mod m). 1. The congruence has a solution if and only if (a,m) b. 2. If u 0 is any particular solution, then a complete set of solutions is: u 0,u 0 + m g,u 0 + 2m g,...,u (g 1)m 0 + g where g = (a,m). Thus there are g solutions. 3. A particular solution u 0 can be obtained by solving the congruence a g x b ( mod m ) g g This is possible since ( a, ) m g g = 1. #82. Prove Part (1) of the above theorem. #83. Prove Part (2) of the above theorem. #84. Prove Part (3) the above theorem. #85. Example 5. Solve 42x 12 (mod 78)

51 2. EULER S PHI FUNCTION Euler s Phi Function Some Background and Definitions: Definition 5.1. A set S = {a 1,a 2,a 3,...,a n } is called a complete residue system or c.r.s. mod n if and only if every positive integer b is congruent to exactly one element a k in S. Note that every c.r.s. mod n contains exactly n elements. Example. Each of the following is a c.r.s. mod 11: {0,1,2,...,10} {1,2,...,10,11} { 5, 4, 3, 2, 2, 1,0,1,2,3,4,5} {0,2,4,6,...,20} Definition 5.2. A set S = {a 1,a 2,a 3,...,a r } is called a reduced residue system or r.r.s. mod n if and only if every positive integer b which is relatively prime to n is congruent to exactly one element a k in S. Note that every r.r.s. mod n contains exactly φ(n) elements, where φ(n) = the number of integers k, 1 k n, which are relatively prime to n. Example. Each of the following is a r.r.s. mod 11: {1,2,...,10} {1,2,...,10,11} { 5, 4, 3, 2, 2, 1,1,2,3,4,5} {2 1,2 2,2 3,...,2 10 } (as we will see later) Definition 5.3. A function f : Z + C is multiplicative if whenever (m,n) = 1, f(mn) = f(m)f(n) Theorem 5.3. The Chinese Remainder Theorem (2 congruence version) Assume that m and n are relatively prime. Then the system (12) x a (mod m) x b (mod n) has a unique solution mod mn.

52 52 5. CONGRUENCES AND POLYNOMIALS To prove the Chinese Remainder Theorem, first solve the linear equation Put u = ns and v = mr and note that u 1 (mod m) u 0 (mod n) A solution to the system (12) is given by mr+ns = 1. and (13) x = au+bv. v 0 (mod m) v 1 (mod n). Theorem 5.4. Euler s phi function φ is multiplicative. Proof. The proof is based on a careful examination of equation (13). Our goal is to show that as a runs through a r.r.s. mod m and b runs through a r.r.s. mod n, the values of x = au+bv run through a r.r.s. mod mn. Equivalently, a r.r.s. mod mn is given by S = {au+bv : a r.r.s. mod m, b r.r.s. mod n}. To see this, prove two following two things: #86. the elements of S are distinct modulo mn. #87. Every number relatively prime to mn is congruent mod mn to some element in S. It follows that the number φ(mn) of elements in a r.r.s. mod mn is precisely φ(m) φ(n). Example. Suppose m = 9 and n = 10. Then a r.r.s. mod 9 is {1,2,4,5,7,8} and a r.r.s. mod 10 is {1,3,7,9}. In our proof, we have u = 10 and v = 9, giving us the following table of values for x = au+bv = 10a 9b: 10a 9b (mod 90) b\a It is straightforward to verify that the entries in this table form a r.r.s. mod 90.

53 Formulas. It is easy to see that for a prime p, and 2. EULER S PHI FUNCTION 53 φ(p) = p 1 φ(p e ) = p e p e 1 = p e( 1 1 p). Thus, since φ is multiplicative, if we know the prime decomposition n = p e 1 1 p e 2 2 p er r, then it is easy to compute φ(n) Exercises. φ(n) = φ(p e 1 1 p e 2 2 p er r ) = φ(p e 1 1 )φ(p e 2 2 ) φ(p er = (p e 1 1 )(p e 2 2 ) (p e k k ) = n r (1 1 ). p k k=1 #88. For what values of n is φ(n) odd? #89. Compute φ(3000). r ) (1 1 )(1 1 ) (1 1 ) p 1 p 2 p r #90. Characterize the set of positive integers n satifying φ(2n) = φ(n). #91. Find all solutions n to φ(n) = 24. #92. Prove there is no solution to φ(n) = 14. #93. Prove or disprove: for a fixed integer m, the equation φ(n) = m has only a finite number of solutions. #94. What is the range of the φ function? That is, characterize the integers m for which φ(n) = m has a solution. #95. The Phi Tree is constructed by drawing an arrow downward from k to φ(k) for each integer k = 1,2,...,n. Draw the Phi Tree for n = 20. #96. Show that liminf n φ(n) n = 0. #97. Find a simple formula involving n for you know, no one has ever done this.] n φ(k). [Truth in exercises: just to let k=1

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime. PUTNAM TRAINING NUMBER THEORY (Last updated: December 11, 2017) Remark. This is a list of exercises on Number Theory. Miguel A. Lerma Exercises 1. Show that the sum of two consecutive primes is never twice

More information

Chapter 5. Number Theory. 5.1 Base b representations

Chapter 5. Number Theory. 5.1 Base b representations Chapter 5 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,

More information

Summary Slides for MATH 342 June 25, 2018

Summary Slides for MATH 342 June 25, 2018 Summary Slides for MATH 342 June 25, 2018 Summary slides based on Elementary Number Theory and its applications by Kenneth Rosen and The Theory of Numbers by Ivan Niven, Herbert Zuckerman, and Hugh Montgomery.

More information

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. 2 Arithmetic This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}. (See [Houston, Chapters 27 & 28]) 2.1 Greatest common divisors Definition 2.16. If a, b are integers, we say

More information

Introduction to Number Theory

Introduction to Number Theory INTRODUCTION Definition: Natural Numbers, Integers Natural numbers: N={0,1,, }. Integers: Z={0,±1,±, }. Definition: Divisor If a Z can be writeen as a=bc where b, c Z, then we say a is divisible by b or,

More information

A Guide to Arithmetic

A Guide to Arithmetic A Guide to Arithmetic Robin Chapman August 5, 1994 These notes give a very brief resumé of my number theory course. Proofs and examples are omitted. Any suggestions for improvements will be gratefully

More information

1 Continued Fractions

1 Continued Fractions Continued Fractions To start off the course, we consider a generalization of the Euclidean Algorithm which has ancient historical roots and yet still has relevance and applications today.. Continued Fraction

More information

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element. The first exam will be on Monday, June 8, 202. The syllabus will be sections. and.2 in Lax, and the number theory handout found on the class web site, plus the handout on the method of successive squaring

More information

1. multiplication is commutative and associative;

1. multiplication is commutative and associative; Chapter 4 The Arithmetic of Z In this chapter, we start by introducing the concept of congruences; these are used in our proof (going back to Gauss 1 ) that every integer has a unique prime factorization.

More information

I Foundations Of Divisibility And Congruence 1

I Foundations Of Divisibility And Congruence 1 Contents I Foundations Of Divisibility And Congruence 1 1 Divisibility 3 1.1 Definitions............................. 3 1.2 Properties Of Divisibility..................... 5 1.3 Some Basic Combinatorial

More information

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z: NUMBER SYSTEMS Number theory is the study of the integers. We denote the set of integers by Z: Z = {..., 3, 2, 1, 0, 1, 2, 3,... }. The integers have two operations defined on them, addition and multiplication,

More information

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2,

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2, SOLUTIONS TO PROBLEM SET 1 Section 1.3 Exercise 4. We see that 1 1 2 = 1 2, 1 1 2 + 1 2 3 = 2 3, 1 1 2 + 1 2 3 + 1 3 4 = 3 4, and is reasonable to conjecture n k=1 We will prove this formula by induction.

More information

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers ALGEBRA CHRISTIAN REMLING 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers by Z = {..., 2, 1, 0, 1,...}. Given a, b Z, we write a b if b = ac for some

More information

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1 MATH 4400 SOLUTIONS TO SOME EXERCISES 1.1.3. If a b and b c show that a c. 1. Chapter 1 Solution: a b means that b = na and b c that c = mb. Substituting b = na gives c = (mn)a, that is, a c. 1.2.1. Find

More information

1 Total Gadha s Complete Book of NUMBER SYSTEM TYPES OF NUMBERS Natural Numbers The group of numbers starting from 1 and including 1,,, 4, 5, and so on, are known as natural numbers. Zero, negative numbers,

More information

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...} WORKSHEET ON NUMBERS, MATH 215 FALL 18(WHYTE) We start our study of numbers with the integers: Z = {..., 2, 1, 0, 1, 2, 3,... } and their subset of natural numbers: N = {1, 2, 3,...} For now we will not

More information

CHAPTER 3. Congruences. Congruence: definitions and properties

CHAPTER 3. Congruences. Congruence: definitions and properties CHAPTER 3 Congruences Part V of PJE Congruence: definitions and properties Definition. (PJE definition 19.1.1) Let m > 0 be an integer. Integers a and b are congruent modulo m if m divides a b. We write

More information

Beautiful Mathematics

Beautiful Mathematics Beautiful Mathematics 1. Principle of Mathematical Induction The set of natural numbers is the set of positive integers {1, 2, 3,... } and is denoted by N. The Principle of Mathematical Induction is a

More information

Math 314 Course Notes: Brief description

Math 314 Course Notes: Brief description Brief description These are notes for Math 34, an introductory course in elementary number theory Students are advised to go through all sections in detail and attempt all problems These notes will be

More information

Number Theory in Problem Solving. Konrad Pilch

Number Theory in Problem Solving. Konrad Pilch Number Theory in Problem Solving Konrad Pilch April 7, 2016 1 Divisibility Number Theory concerns itself mostly with the study of the natural numbers (N) and the integers (Z). As a consequence, it deals

More information

Elementary Number Theory MARUCO. Summer, 2018

Elementary Number Theory MARUCO. Summer, 2018 Elementary Number Theory MARUCO Summer, 2018 Problem Set #0 axiom, theorem, proof, Z, N. Axioms Make a list of axioms for the integers. Does your list adequately describe them? Can you make this list as

More information

Winter Camp 2009 Number Theory Tips and Tricks

Winter Camp 2009 Number Theory Tips and Tricks Winter Camp 2009 Number Theory Tips and Tricks David Arthur darthur@gmail.com 1 Introduction This handout is about some of the key techniques for solving number theory problems, especially Diophantine

More information

PRIME NUMBERS YANKI LEKILI

PRIME NUMBERS YANKI LEKILI PRIME NUMBERS YANKI LEKILI We denote by N the set of natural numbers: 1,2,..., These are constructed using Peano axioms. We will not get into the philosophical questions related to this and simply assume

More information

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic 11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic Bezout s Lemma Let's look at the values of 4x + 6y when x and y are integers. If x is -6 and y is 4 we

More information

Numbers, Groups and Cryptography. Gordan Savin

Numbers, Groups and Cryptography. Gordan Savin Numbers, Groups and Cryptography Gordan Savin Contents Chapter 1. Euclidean Algorithm 5 1. Euclidean Algorithm 5 2. Fundamental Theorem of Arithmetic 9 3. Uniqueness of Factorization 14 4. Efficiency

More information

1 Overview and revision

1 Overview and revision MTH6128 Number Theory Notes 1 Spring 2018 1 Overview and revision In this section we will meet some of the concerns of Number Theory, and have a brief revision of some of the relevant material from Introduction

More information

Gaussian integers. 1 = a 2 + b 2 = c 2 + d 2.

Gaussian integers. 1 = a 2 + b 2 = c 2 + d 2. Gaussian integers 1 Units in Z[i] An element x = a + bi Z[i], a, b Z is a unit if there exists y = c + di Z[i] such that xy = 1. This implies 1 = x 2 y 2 = (a 2 + b 2 )(c 2 + d 2 ) But a 2, b 2, c 2, d

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand 1 Divisibility, prime numbers By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a k for some integer k. Notation

More information

Numbers and their divisors

Numbers and their divisors Chapter 1 Numbers and their divisors 1.1 Some number theoretic functions Theorem 1.1 (Fundamental Theorem of Arithmetic). Every positive integer > 1 is uniquely the product of distinct prime powers: n

More information

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer? Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative

More information

8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

More information

Math 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby

Math 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby Math 8: Advanced Number Theory Samit Dasgupta and Gary Kirby April, 05 Contents Basics of Number Theory. The Fundamental Theorem of Arithmetic......................... The Euclidean Algorithm and Unique

More information

Notes on Continued Fractions for Math 4400

Notes on Continued Fractions for Math 4400 . Continued fractions. Notes on Continued Fractions for Math 4400 The continued fraction expansion converts a positive real number α into a sequence of natural numbers. Conversely, a sequence of natural

More information

Applied Cryptography and Computer Security CSE 664 Spring 2017

Applied Cryptography and Computer Security CSE 664 Spring 2017 Applied Cryptography and Computer Security Lecture 11: Introduction to Number Theory Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline What we ve covered so far: symmetric

More information

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93. Exercises Exercises 1. Determine whether each of these integers is prime. a) 21 b) 29 c) 71 d) 97 e) 111 f) 143 2. Determine whether each of these integers is prime. a) 19 b) 27 c) 93 d) 101 e) 107 f)

More information

Part II. Number Theory. Year

Part II. Number Theory. Year Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 Paper 3, Section I 1G 70 Explain what is meant by an Euler pseudoprime and a strong pseudoprime. Show that 65 is an Euler

More information

Table of Contents. 2013, Pearson Education, Inc.

Table of Contents. 2013, Pearson Education, Inc. Table of Contents Chapter 1 What is Number Theory? 1 Chapter Pythagorean Triples 5 Chapter 3 Pythagorean Triples and the Unit Circle 11 Chapter 4 Sums of Higher Powers and Fermat s Last Theorem 16 Chapter

More information

Elementary Number Theory Review. Franz Luef

Elementary Number Theory Review. Franz Luef Elementary Number Theory Review Principle of Induction Principle of Induction Suppose we have a sequence of mathematical statements P(1), P(2),... such that (a) P(1) is true. (b) If P(k) is true, then

More information

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases Lecture 2. The Euclidean Algorithm and Numbers in Other Bases At the end of Lecture 1, we gave formulas for the greatest common divisor GCD (a, b), and the least common multiple LCM (a, b) of two integers

More information

LEGENDRE S THEOREM, LEGRANGE S DESCENT

LEGENDRE S THEOREM, LEGRANGE S DESCENT LEGENDRE S THEOREM, LEGRANGE S DESCENT SUPPLEMENT FOR MATH 370: NUMBER THEORY Abstract. Legendre gave simple necessary and sufficient conditions for the solvablility of the diophantine equation ax 2 +

More information

Number Theory Proof Portfolio

Number Theory Proof Portfolio Number Theory Proof Portfolio Jordan Rock May 12, 2015 This portfolio is a collection of Number Theory proofs and problems done by Jordan Rock in the Spring of 2014. The problems are organized first by

More information

CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS

CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS JEREMY BOOHER Continued fractions usually get short-changed at PROMYS, but they are interesting in their own right and useful in other areas

More information

18 Divisibility. and 0 r < d. Lemma Let n,d Z with d 0. If n = qd+r = q d+r with 0 r,r < d, then q = q and r = r.

18 Divisibility. and 0 r < d. Lemma Let n,d Z with d 0. If n = qd+r = q d+r with 0 r,r < d, then q = q and r = r. 118 18. DIVISIBILITY 18 Divisibility Chapter V Theory of the Integers One of the oldest surviving mathematical texts is Euclid s Elements, a collection of 13 books. This book, dating back to several hundred

More information

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska LECTURE 12 CHAPTER 4 NUMBER THEORY PART1: Divisibility PART 2: Primes PART 1: DIVISIBILITY Basic Definitions Definition Given m,n Z, we say

More information

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru Number Theory Marathon Mario Ynocente Castro, National University of Engineering, Peru 1 2 Chapter 1 Problems 1. (IMO 1975) Let f(n) denote the sum of the digits of n. Find f(f(f(4444 4444 ))). 2. Prove

More information

Modular Arithmetic Instructor: Marizza Bailey Name:

Modular Arithmetic Instructor: Marizza Bailey Name: Modular Arithmetic Instructor: Marizza Bailey Name: 1. Introduction to Modular Arithmetic If someone asks you what day it is 145 days from now, what would you answer? Would you count 145 days, or find

More information

Intermediate Math Circles February 26, 2014 Diophantine Equations I

Intermediate Math Circles February 26, 2014 Diophantine Equations I Intermediate Math Circles February 26, 2014 Diophantine Equations I 1. An introduction to Diophantine equations A Diophantine equation is a polynomial equation that is intended to be solved over the integers.

More information

A Few Primality Testing Algorithms

A Few Primality Testing Algorithms A Few Primality Testing Algorithms Donald Brower April 2, 2006 0.1 Introduction These notes will cover a few primality testing algorithms. There are many such, some prove that a number is prime, others

More information

ECEN 5022 Cryptography

ECEN 5022 Cryptography Elementary Algebra and Number Theory University of Colorado Spring 2008 Divisibility, Primes Definition. N denotes the set {1, 2, 3,...} of natural numbers and Z denotes the set of integers {..., 2, 1,

More information

Math 511, Algebraic Systems, Fall 2017 July 20, 2017 Edition. Todd Cochrane

Math 511, Algebraic Systems, Fall 2017 July 20, 2017 Edition. Todd Cochrane Math 511, Algebraic Systems, Fall 2017 July 20, 2017 Edition Todd Cochrane Department of Mathematics Kansas State University Contents Notation v Chapter 0. Axioms for the set of Integers Z. 1 Chapter 1.

More information

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya BBM 205 Discrete Mathematics Hacettepe University http://web.cs.hacettepe.edu.tr/ bbm205 Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya Resources: Kenneth Rosen,

More information

a the relation arb is defined if and only if = 2 k, k

a the relation arb is defined if and only if = 2 k, k DISCRETE MATHEMATICS Past Paper Questions in Number Theory 1. Prove that 3k + 2 and 5k + 3, k are relatively prime. (Total 6 marks) 2. (a) Given that the integers m and n are such that 3 (m 2 + n 2 ),

More information

Number Theory. Zachary Friggstad. Programming Club Meeting

Number Theory. Zachary Friggstad. Programming Club Meeting Number Theory Zachary Friggstad Programming Club Meeting Outline Factoring Sieve Multiplicative Functions Greatest Common Divisors Applications Chinese Remainder Theorem Throughout, problems to try are

More information

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions MATH 11/CSCI 11, Discrete Structures I Winter 007 Toby Kenney Homework Sheet 5 Hints & Model Solutions Sheet 4 5 Define the repeat of a positive integer as the number obtained by writing it twice in a

More information

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer? Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative

More information

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

CHAPTER 6. Prime Numbers. Definition and Fundamental Results CHAPTER 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results 6.1. Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and the only positive divisors of p are 1 and p. If n

More information

Q 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today?

Q 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today? 2 Mod math Modular arithmetic is the math you do when you talk about time on a clock. For example, if it s 9 o clock right now, then it ll be 1 o clock in 4 hours. Clearly, 9 + 4 1 in general. But on a

More information

M381 Number Theory 2004 Page 1

M381 Number Theory 2004 Page 1 M81 Number Theory 2004 Page 1 [[ Comments are written like this. Please send me (dave@wildd.freeserve.co.uk) details of any errors you find or suggestions for improvements. ]] Question 1 20 = 2 * 10 +

More information

Math Precalculus I University of Hawai i at Mānoa Spring

Math Precalculus I University of Hawai i at Mānoa Spring Math 135 - Precalculus I University of Hawai i at Mānoa Spring - 2013 Created for Math 135, Spring 2008 by Lukasz Grabarek and Michael Joyce Send comments and corrections to lukasz@math.hawaii.edu Contents

More information

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6 Math 131 notes Jason Riedy 6 October, 2008 Contents 1 Modular arithmetic 2 2 Divisibility rules 3 3 Greatest common divisor 4 4 Least common multiple 4 5 Euclidean GCD algorithm 5 6 Linear Diophantine

More information

Theory of Numbers Problems

Theory of Numbers Problems Theory of Numbers Problems Antonios-Alexandros Robotis Robotis October 2018 1 First Set 1. Find values of x and y so that 71x 50y = 1. 2. Prove that if n is odd, then n 2 1 is divisible by 8. 3. Define

More information

Math Circle: Recursion and Induction

Math Circle: Recursion and Induction Math Circle: Recursion and Induction Prof. Wickerhauser 1 Recursion What can we compute, using only simple formulas and rules that everyone can understand? 1. Let us use N to denote the set of counting

More information

Math Review. for the Quantitative Reasoning measure of the GRE General Test

Math Review. for the Quantitative Reasoning measure of the GRE General Test Math Review for the Quantitative Reasoning measure of the GRE General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important for solving

More information

LECTURE NOTES IN CRYPTOGRAPHY

LECTURE NOTES IN CRYPTOGRAPHY 1 LECTURE NOTES IN CRYPTOGRAPHY Thomas Johansson 2005/2006 c Thomas Johansson 2006 2 Chapter 1 Abstract algebra and Number theory Before we start the treatment of cryptography we need to review some basic

More information

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively 6 Prime Numbers Part VI of PJE 6.1 Fundamental Results Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively D (p) = { p 1 1 p}. Otherwise

More information

MATH Fundamental Concepts of Algebra

MATH Fundamental Concepts of Algebra MATH 4001 Fundamental Concepts of Algebra Instructor: Darci L. Kracht Kent State University April, 015 0 Introduction We will begin our study of mathematics this semester with the familiar notion of even

More information

3 Finite continued fractions

3 Finite continued fractions MTH628 Number Theory Notes 3 Spring 209 3 Finite continued fractions 3. Introduction Let us return to the calculation of gcd(225, 57) from the preceding chapter. 225 = 57 + 68 57 = 68 2 + 2 68 = 2 3 +

More information

Math /Foundations of Algebra/Fall 2017 Foundations of the Foundations: Proofs

Math /Foundations of Algebra/Fall 2017 Foundations of the Foundations: Proofs Math 4030-001/Foundations of Algebra/Fall 017 Foundations of the Foundations: Proofs A proof is a demonstration of the truth of a mathematical statement. We already know what a mathematical statement is.

More information

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24 Direct Proof MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Direct Proof Fall 2014 1 / 24 Outline 1 Overview of Proof 2 Theorems 3 Definitions 4 Direct Proof 5 Using

More information

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time. 8 Modular Arithmetic We introduce an operator mod. Let d be a positive integer. For c a nonnegative integer, the value c mod d is the remainder when c is divided by d. For example, c mod d = 0 if and only

More information

A Readable Introduction to Real Mathematics

A Readable Introduction to Real Mathematics Solutions to selected problems in the book A Readable Introduction to Real Mathematics D. Rosenthal, D. Rosenthal, P. Rosenthal Chapter 7: The Euclidean Algorithm and Applications 1. Find the greatest

More information

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2 8. p-adic numbers 8.1. Motivation: Solving x 2 a (mod p n ). Take an odd prime p, and ( an) integer a coprime to p. Then, as we know, x 2 a (mod p) has a solution x Z iff = 1. In this case we can suppose

More information

Chapter 1A -- Real Numbers. iff. Math Symbols: Sets of Numbers

Chapter 1A -- Real Numbers. iff. Math Symbols: Sets of Numbers Fry Texas A&M University! Fall 2016! Math 150 Notes! Section 1A! Page 1 Chapter 1A -- Real Numbers Math Symbols: iff or Example: Let A = {2, 4, 6, 8, 10, 12, 14, 16,...} and let B = {3, 6, 9, 12, 15, 18,

More information

3 The language of proof

3 The language of proof 3 The language of proof After working through this section, you should be able to: (a) understand what is asserted by various types of mathematical statements, in particular implications and equivalences;

More information

Elementary Properties of the Integers

Elementary Properties of the Integers Elementary Properties of the Integers 1 1. Basis Representation Theorem (Thm 1-3) 2. Euclid s Division Lemma (Thm 2-1) 3. Greatest Common Divisor 4. Properties of Prime Numbers 5. Fundamental Theorem of

More information

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr. Chapter : Logic Topics:. Statements, Negation, and Compound Statements.2 Truth Tables and Logical Equivalences.3

More information

Standard forms for writing numbers

Standard forms for writing numbers Standard forms for writing numbers In order to relate the abstract mathematical descriptions of familiar number systems to the everyday descriptions of numbers by decimal expansions and similar means,

More information

CHAPTER 1 NUMBER SYSTEMS. 1.1 Introduction

CHAPTER 1 NUMBER SYSTEMS. 1.1 Introduction N UMBER S YSTEMS NUMBER SYSTEMS CHAPTER. Introduction In your earlier classes, you have learnt about the number line and how to represent various types of numbers on it (see Fig..). Fig.. : The number

More information

4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus...

4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus... PREFACE These notes have been prepared by Dr Mike Canfell (with minor changes and extensions by Dr Gerd Schmalz) for use by the external students in the unit PMTH 338 Number Theory. This booklet covers

More information

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald) Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald) 1 Euclid s Algorithm Euclid s Algorithm for computing the greatest common divisor belongs to the oldest known computing procedures

More information

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru Number Theory Marathon Mario Ynocente Castro, National University of Engineering, Peru 1 2 Chapter 1 Problems 1. (IMO 1975) Let f(n) denote the sum of the digits of n. Find f(f(f(4444 4444 ))). 2. Prove

More information

Topics in Number Theory

Topics in Number Theory Topics in Number Theory Valentin Goranko Topics in Number Theory This essay is an introduction to some basic topics in number theory related to divisibility, prime numbers and congruences. These topics

More information

Lecture Notes. Advanced Discrete Structures COT S

Lecture Notes. Advanced Discrete Structures COT S Lecture Notes Advanced Discrete Structures COT 4115.001 S15 2015-01-13 Recap Divisibility Prime Number Theorem Euclid s Lemma Fundamental Theorem of Arithmetic Euclidean Algorithm Basic Notions - Section

More information

Part IA Numbers and Sets

Part IA Numbers and Sets Part IA Numbers and Sets Definitions Based on lectures by A. G. Thomason Notes taken by Dexter Chua Michaelmas 2014 These notes are not endorsed by the lecturers, and I have modified them (often significantly)

More information

Executive Assessment. Executive Assessment Math Review. Section 1.0, Arithmetic, includes the following topics:

Executive Assessment. Executive Assessment Math Review. Section 1.0, Arithmetic, includes the following topics: Executive Assessment Math Review Although the following provides a review of some of the mathematical concepts of arithmetic and algebra, it is not intended to be a textbook. You should use this chapter

More information

Deepening Mathematics Instruction for Secondary Teachers: Algebraic Structures

Deepening Mathematics Instruction for Secondary Teachers: Algebraic Structures Deepening Mathematics Instruction for Secondary Teachers: Algebraic Structures Lance Burger Fresno State Preliminary Edition Contents Preface ix 1 Z The Integers 1 1.1 What are the Integers?......................

More information

Lecture 4: Number theory

Lecture 4: Number theory Lecture 4: Number theory Rajat Mittal IIT Kanpur In the next few classes we will talk about the basics of number theory. Number theory studies the properties of natural numbers and is considered one of

More information

Proofs. Chapter 2 P P Q Q

Proofs. Chapter 2 P P Q Q Chapter Proofs In this chapter we develop three methods for proving a statement. To start let s suppose the statement is of the form P Q or if P, then Q. Direct: This method typically starts with P. Then,

More information

Homework #2 solutions Due: June 15, 2012

Homework #2 solutions Due: June 15, 2012 All of the following exercises are based on the material in the handout on integers found on the class website. 1. Find d = gcd(475, 385) and express it as a linear combination of 475 and 385. That is

More information

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2000 2013 Contents 9 Introduction to Number Theory 63 9.1 Subgroups

More information

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results Euclid s Division Lemma : Given two positive integers a and b, there exist unique integers q and r satisfying a = bq + r, 0 r < b. Euclid s Division

More information

Chapter 1 The Real Numbers

Chapter 1 The Real Numbers Chapter 1 The Real Numbers In a beginning course in calculus, the emphasis is on introducing the techniques of the subject;i.e., differentiation and integration and their applications. An advanced calculus

More information

7.2 Applications of Euler s and Fermat s Theorem.

7.2 Applications of Euler s and Fermat s Theorem. 7.2 Applications of Euler s and Fermat s Theorem. i) Finding and using inverses. From Fermat s Little Theorem we see that if p is prime and p a then a p 1 1 mod p, or equivalently a p 2 a 1 mod p. This

More information

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions Warm-up Problems 1. What is a prime number? Give an example of an even prime number and an odd prime number. A prime number

More information

Number Theory. Henry Liu, 6 July 2007

Number Theory. Henry Liu, 6 July 2007 Number Theory Henry Liu, 6 July 007 1. Introduction In one sentence, number theory is the area of mathematics which studies the properties of integers. Some of the most studied subareas are the theories

More information

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2006 Contents 9 Introduction to Number Theory and Cryptography 1 9.1 Subgroups

More information

Divisibility. Chapter Divisors and Residues

Divisibility. Chapter Divisors and Residues Chapter 1 Divisibility Number theory is concerned with the properties of the integers. By the word integers we mean the counting numbers 1, 2, 3,..., together with their negatives and zero. Accordingly

More information

1. Given the public RSA encryption key (e, n) = (5, 35), find the corresponding decryption key (d, n).

1. Given the public RSA encryption key (e, n) = (5, 35), find the corresponding decryption key (d, n). MATH 135: Randomized Exam Practice Problems These are the warm-up exercises and recommended problems taken from all the extra practice sets presented in random order. The challenge problems have not been

More information

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES 2018 57 5. p-adic Numbers 5.1. Motivating examples. We all know that 2 is irrational, so that 2 is not a square in the rational field Q, but that we can

More information