Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures

Save this PDF as:

Size: px
Start display at page:

Download "Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures"

Transcription

1 Number Theory Hungarian Style Cameron Byerley s interpretation of Csaba Szabó s lectures August 20, 2005

2 2 0.1 introduction Number theory is a beautiful subject and even cooler when you learn about it in Budapest. So before we get started lets just talk about a few really cool reasons to take number theory. For example but the end of the course you will have the entire proof of Fermat s Last Theorem memorized, or at least if you want to pass you will! This book is based on the Number Theory lectures in the Spring of It will be the basis for my senior thesis that will be completed by May This means, you are reading a work in progress. I know people often complain about math books, that they are poorly written, or missing something important, or hard to understand, or boring, or that the jokes are awful or that math books shouldn t have jokes. If you have any or all of these problems with this book and a suggestion for improvement me at or pass the comment along to Csaba. I m sure neither of us would want another semester of BSMers to suffer through a bad textbook for Number Theory.

3 Chapter 1 The Boring Part 1.1 Divisibility The concept of divisibility is widely used in number theory. All of you already have an intuitive sense about divisibility but formalizing the idea is crucial to writing proofs. Definition Divisibility Given two integers a and b, we say a divides b if and only if there exists an integer c such that b = ac. In symbols we write, a b c : ac = b. We will give special consideration when a or b equal 0. Zero only divides 0. This follows from the definition because 0 c b unless b = 0. Every non-zero integer divides zero since a 0 = 0 for any value of a. There are a number of basic yet frequently used theorems that follow from the definition of divisibility. Theorem Divisibility Properties 1. a b implies a bc for any integer c 2. a b and b c imply a c 3. a b and a c imply a (bx + cy) for any integers x and y 4. a b implies a b 5. a b and b a implies a = ±b 3

4 4 CHAPTER 1. THE BORING PART 6. a b if and only if ma mb as long as m 0 Each of these statements can be proven using the definition of divisibility. You can try to figure out the proofs yourself and check them below. 1. Assume that a b. By the definition of divisibility this means there exists an integer k such that b = ak. Multiply both sides by c to get bc = akc. Since both k and c are integers kc is an integer, call it k Thus a bc because we found an integer k such that bc = ak. 2. Assume that a b and b c. By definition there exists integers k 1 and k 2 such that b = ak 1 and c = bk 2. Substitute the value ak 1 for b in the second equation to get c = ak 1 k 2. Let k 3 = k 1 k 2 and note that k 3 is an integer. Thus c = ak 3 and by definition a c. 3. Assume that a b and a c. By property 1. we know that a bx and a cy for any integers x and y. By definition bx = ak 1 and cy = ak 2. We can add these two equations to get bx + cy = ak 1 + ak 2. Factoring we get bx + cy = a(k 1 + k 2 ). It s easy to see that k 1 + k 2 is an integer so a bx + cy by definition. 4. Assume that a b. Well by definition b = ac where c is an integer. The absolute value of all integers is greater than or equal to 1 so if we are multiplying a by something at least 1 then b must be greater than or equal to a. I don t have a rigorous definition of absolute value for this proof. 5. Assume a b which implies b = ax for some integer x. Also assume b a, which implies a = by. Substitute by for a to arrive at the equation b = byx. It follows that xy = 1 or x = ±1 and y = ±1. Hence, a = ±b. 6. Assume a b. This implies that b = ax for some integer x. Note that b = ax if and only if mb = max for some integer x, as long as m 0. The definition of divisibility tells us ma = max is equivalent to ma mb and b = ax is equivalent to a b. Although these proofs are fairly simple and not terribly exciting, they show the importance of being able to use the definition of divisibility.

5 1.2. THE DIVISION ALGORITHM The Division Algorithm The Division Algorithm is the formalization of a concept that already makes intuitive sense to those familiar with long division. If we divide any integer into another one, we always find a unique quotient and remainder. In grade school life was simple; there was always just one answer to our math assignments. Theorem Division Algorithm For any integers a and b with b 0 there exists values q and r such that a = bq + r and r b Proof : Assume that a 0 and b 0. If a = 0 then q and r must be zero. Examine the sequence of decreasing integers given by a b, a 2b, a kb Subtract multiples of b from a until the value of a kb is between 0 and b. If 0 < a kb and b < a kb then we can consider 0 < a (k + 1)b. This new value is greater than 0 and hopefully smaller than b. If not, we can continue the process until 0 < a kb < b. There is only one value of a kb between 0 and b and it is equal to our remainder r. Therefore, r = min{a kb k Z} where 0 r < b. We can see that our value of k is unique and corresponds to our quotient q. Using this method we can always find q and r. You may have noticed that the Division Algorithm is true for all integers but that we have only proved it when a and b are positive. A very similar proof works when we have negative values. If a = bq + r then a = b( q) + ( r). Changing the signs does not matter. 1.3 The Euclidean Algorithm In this section we will define an algorithm that is the basis for many ideas in number theory. It is closely related to a concept that everyone who paid even a little bit of attention in middle school should know, namely, the greatest common divisor. Before looking at the algorithm that finds the greatest common divisor, we will revise our definition so that we can consider it in a more sophisticated manner.

6 6 CHAPTER 1. THE BORING PART Definition Distinguished Common Divisor a.k.a GCD We say that d is the distinguished common divisor of two numbers a and b if it satisfies the following two conditions. First d a and d b. And second, if c a and c b then c d. These two conditions say that the distinguished common divisor must divide both a and b and if there is any other number, c that divides both a and b it must also divide the distinguished common divisor. Note that in the integers this translates directly to the idea of greatest. If all of the other divisors of two numbers divide d, it must be the greatest one. We purposefully avoid using the idea of greatest so that we can extend the definition to polynomials and complex numbers where greatest does not make sense. Now we will define the distinguished common divisor in terms of the Euclidean Algorithm. Because of the Division Algorithm, if we divide b into a we find a unique quotient and remainder. If we divide the remainder, r 1, of this division into b, we again find a unique quotient and remainder. a = bq 1 + r 1 b = r 1 q 2 + r 2 r 1 = r 2 q 3 + r 3.. r k 3 = r k 2 q k 1 + r k 1 r k 2 = r k 1 q k + r k r k 1 = r k q k We eventually find a remainder of zero because our remainders are a descending sequence of positive integers. Note that r i+1 < r i. Mathematicians with a superior Hungarian education call r k the distinguished common divisor. The distinguished common divisor corresponds to the last remainder r k in the Euclidean Algorithm. In the integers the positive distinguished common divisor corresponds exactly to the familiar greatest common divisor. At first glance you may wonder why we are making the definition of the greatest common divisor so complicated and giving it a new name, when the definition we already know is so simple. Up to this point we have only been considering integers but as long as we are only using notions of divisibility we can extend our ideas to other types of numbers or mathematical objects. Those familiar with algebra would call these objects rings. For example this new definition of the distinguished common divisor makes sense when a and

7 1.3. THE EUCLIDEAN ALGORITHM 7 b are polynomials or complex numbers. However, we can not logically talk about a greatest polynomial or greatest complex number. Theorem The last remainder, r k in the Euclidean algorithm starting with the numbers a and b is the distinguished common divisor of a and b. Proof To prove that r k is a divisor we first show that r k a and r k b. To show that r k is a distinguished divisor we must show c a and c b implies c r k. Our proof begins with the fact that r k 1 = r k q k By the definition of divisibility we see that r k r k 1. Division rule 1. tells us that r k r k 1 implies r k q k r k 1. If we know that r k r k and r k q k r k 1 then division rule 3. tells us that r k divides the sum. Hence r k r k 1 q k + r k = r k 2 We ve shown that r k r k 2. By the same logic, if we know that r k r k 1 and r k r k 2 then we can show that r k r k 3. By continuing this process up the Euclidean Algorithm we see that r k a and r k b. Now that we have proved that r k is a common divisor, we must prove that it is distinguished. To do this we prove that any number that divides a and b also divides r k. Assume c a and c b c b c bq 1 If we know that c a and c bq 1 then it must also divide the difference, therefore, c a bq 1. This difference however is the same as our first remainder since, a bq 1 = r 1. Repeating the process we see that c r 1 and c b c b r 1 q 2 = r 2 By continuing this process until we reach the end of the Euclidean Algorithm we see that c r k. We can translate these ideas of divisibility back to our familiar notions of the greatest common divisor as long as we note that we are limiting ourselves to numbers where the idea of greatest makes sense. Since c divides r k it must be less than or equal to r k. Thus, r k is the greatest common divisor. Note that every divisor of both a and b divides the greatest common divisor. From now on we will just refer to the distinguished common divisor as the greatest.

8 8 CHAPTER 1. THE BORING PART 1.4 Greatest Common Divisor Now that we have defined the greatest common divisor in terms of the Euclidean Algorithm we will state and prove a few of its important properties. In number theory the greatest common divisor of a and b is denoted by (a, b). Theorem GCD is a Linear Combination If g is the greatest common divisor of a and b, then there exist integers x and y such that g = (a, b) = ax + by. Furthermore anything written in the form ax + by where x and y range over all integers is divisible by the greatest common divisor. Proof The proof of this fact is a direct extension of the Euclidean Algorithm. Remember that the Euclidean Algorithm tells us that a = bq 1 + r 1 b = r 1 q 2 + r 2 r 1 = r 2 q 3 + r 3. r k 1 = r k q k We are now trying to write r k as a linear combination of a and b. By applying simple algebra to the equations from the Euclidean Algorithm we see that r 1 = a bq 1 r 2 = b r 1 q 2 We can replace r 1 in the expression for r 2 so that we still have a linear combination of a and b. This gives us r 2 = b (a bq 1 )q 2 or equivalently r 2 = b(q 1 + 1) + a( q 2 ) By continuing this process of substitution, we arrive at an expression for r k that is a linear combination of a and b. Thus there exists x, y Z such that r k = (a, b) = ax + by. Now that we have shown that we can write (a, b) = ax + by we will show that (a, b) divides ax + by for all values of x and y. By the definition of the

9 1.4. GREATEST COMMON DIVISOR 9 G.C.D we know that (a, b) a and (a, b) b. Property number 3 of divisibility tells us that (a, b) ax + by We can also say that ax + by is always equal to a multiple of the greatest common divisor. This follows because we can write {ax + by x, y Z} = {(a, b)z z Z} z(a, b) = z(ax 0 + by 0 ) = a(zx 0 ) + b(zy 0 ) If we translate these ideas back to the common man s definition of greatest common divisor, we say that the greatest common divisor is the smallest positive value of ax + by as x and y range over all of the integers. The advantage to defining it the other way is that we use only the notion of divides which can easily be extended to number systems where the idea of smallest doesn t make sense Properties of the GCD The greatest common divisor has a number of other properties that are often useful in proofs. Theorem Properties of the GCD 1. (ma, mb) = m(a, b) 2. (a, b) = (a, a + b) 3. (a, b) is unique up to sign To prove that two expressions are equal in number theory it suffices to show that the left side divides the right and the right side divides the left. Proof of Property 1 First we show that (ma, mb) m(a, b) and then m(a, b) (ma, mb). We know that (ma, mb) (ma)x + (mb)y for all x, y Z Thus (ma, mb) m(ax + by)

10 10 CHAPTER 1. THE BORING PART Because we can write a greatest common divisor as a linear combination there exists x 1, y 1 Z : (a, b) = ax 1 + by 1 In particular (ma, mb) m(ax 1 + by 1 ). Thus (ma, mb) m(a, b). We will now do the proof in the other direction. Note that m(a, b) ma and m(a, b) mb If a number divides ma and mb it must also divide the g.c.d. Therefore m(a, b) (ma, mb) By putting both halves of the proof together we conclude that (ma, mb) = m(a, b). Proof of Property 2 First we show that (a, b) (a, a + b). Because of the definition of the greatest common divisor we know that (a, b) a and (a, b) b. This implies that (a, b) a +b. The definition of the greatest common divisor tells us that (a, b) (a, a + b). Now we will prove that (a, a + b) (a, b). By the definition of the greatest common divisor we see that (a, a + b) a and (a, a + b) a + b If something divides two number it divides the difference. This simplifies to (a, a + b) a + b a (a, a + b) b Since (a, a + b) divides a and b by the definition of the greatest common divisor we know that (a, a + b) (a, b) Proof of Property 3 Now we will prove that the greatest common divisor of two numbers is unique. Assume d 1 and d 2 are both g.c.d. s. All divisors of a number divide the g.c.d so d 1 d 2 and d 2 d 1 By the definition of divisibility we know d 1 = d 2 y and d 2 = d 1 x

11 1.5. RELATIVELY PRIME 11 Substituting we get This equation is only true if d 2 = d 2 xy Thus xy = 1 x = ±1 d 1 = ±d 2 If two numbers both share the properties of the greatest common divisor they must be the same number up to sign. 1.5 Relatively Prime If you asked a man on the street to define relatively prime, he would say two numbers are relatively prime if they have no divisors in common. All prime numbers must be relatively prime to each other and composite numbers are relatively prime if their prime factorization s have nothing in common. Although everyone is already familiar with the ideas of primes and factorization we will define relatively prime using only the ideas we that have already been presented. In the language of the greatest common divisor we say that a and b are relatively prime if and only if (a, b) = 1. We will state two new theorems using the idea of relatively prime. Theorem Relatively Prime If (a, m) = 1 and (b, m) = 1 then (ab, m) = 1. Proof To prove this we use the fact that the greatest common divisor can be written as a linear combination. 1 = ax 1 + my 1 1 = bx 2 + my 2 Multiplying the two equations together we get We factor out an m to get 1 = abx 1 x 2 + ax 1 my 2 + bx 2 my 1 + my 1 my 2 1 = ab(x 1 x 2 ) + m(ax 1 y 2 + bx 2 y 1 + my 1 y 2 )

12 12 CHAPTER 1. THE BORING PART We have shown that a linear combination of ab and m is equal to 1. (m, ab) ab and (m, ab) m (m, ab) ab(x 1 x 2 ) + m(ax 1 y 2 + bx 2 y 1 + my 1 y 2 ) Thus (m, ab) 1 Since (m,ab) is a positive integer if it divides 1 it must be equal to 1. If we are just dealing with the integers, we can note that the g.c.d is the smallest possible linear combination of ab and m. If we show that a linear combination is equal to 1, it must be the smallest since 1 is the smallest positive integer. You d be surprised how helpful that statement can be! Theorem Theorem If a bc and (a, b) = 1 then a c. In more colloquial language this says that if a and b have no factors in common then if a divides bc it must divide c. Proof Because a and b are relatively prime we know that 1 = ax + by. Multiply both sides of the equation by c to get c = cax + cby. It s clear that a cax and we know that a cby by assumption so we see that a c. Least Common Multiple The least common multiple is an idea closely related to the greatest common divisor. The least common multiple of integers a and b is the smallest number that they both divide. The least common multiple, c, of a and b is denoted c = [a, b]. If c = [a, b], then for any integer d, a d and b d c d Problems

13 Chapter 2 Prime Numbers Prime numbers are so exciting because they are the building blocks of every number and are the focus of many exciting conjectures and theorems in number theory. Also there are a number of people who delight in finding big primes or cool primes such as... If you asked a man on the street to define a prime number, he might give you a number of definitions that more or less were correct. In number theory, however, we will use the following definition of prime. Definition Prime Number p is prime if and only if p ab p a or p b This definition should make intuitive sense to you. If a prime number divides 15 it must either divide 5 or 3. If the a prime divides a number it is equal to one of its prime factors. 2.1 Irreducible vs. Prime In this section we will discuss the similarities and differences between irreducible and prime numbers. Over the integers the two ideas are equivalent. Two idea are equivalent if they imply each other. In this case, knowing a number is prime implies it is irreducible and if we know it is irreducible it implies it is prime. In other sets, such as the even integers, the definitions are not equivalent and we can find prime numbers that are not irreducible. Definition Irreducible We say that f is irreducible if a f implies a = ±1 or ±f 13

14 14 CHAPTER 2. PRIME NUMBERS We could also say that f is irreducible if f = ab implies a or b = ±1. Even though this seems similar to our earlier definition of prime, the following examples will illustrate the difference. Example Consider the even integers, denoted 2Z. Over the even numbers, 2 is irreducible because a 2 a = ±2 or a = ±1. Over the evens, 6 is also irreducible because even though 6 = 2 3 we have not reduced our number because 3 2Z. In fact 2 does not divide 6 because there does not exist x 2Z such that 2x = 6. We can extend this idea to prove that 2 times any odd number is irreducible over 2Z. If x is reducible, then x = ab where a, b 2Z. Since a and b are even we can write them in the form a = 2a and b = 2b. Thus x = 4a b and is therefore divisible by 4. Since x = 2 odd and odd numbers have no factors of 2 we know x cannot be divisible by 2 2. Thus a and b cannot both be even numbers. Over the even integers prime numbers also behave differently. For example the number 10 is prime because it can not be written as the product of two even numbers. Over the evens 2, 6, 10, 14 are prime while the numbers 4, 8, 12 are composite. Note that 2 2 because 1 2Z. Also over the even integers factorization is not unique. For example 60 = 2 30 = Even though the distinction between irreducibility and prime is a bit counterintuitive in the even integers, it will seem more familiar when we consider all integers. Theorem Irreducible vs. irreducible if and only if it is prime. Prime Over the integers a number is Proof Assume that p is prime with p = ab. By the definition of divisibility we see that a p and by the definition of prime we see that p a or p b. If p a then a = ±p and b = ±1. If p b then using the same logic p = ±b and a = ±1. This is the definition of irreducible. Now for the other way. Assume that f is irreducible. Suppose f ab. Note that (f, a) = f if f a If f a then a = ±1 since f is irreducible. Thus (f, a) = 1. By the Euclidean Algorithm 1 = fx + ay

15 2.2. NORMS 15 Multiplying by b we get It is obvious that and by assumption These two statements imply that b = fbx + bay f fb f ba f b We have shown that if f ab then f a or f b, so f must be prime. Now we will use the definition of prime to prove another theorem. Theorem Prime Divisor p a 1 a 2 a n i such that p a i Proof p a 1 (a 2 a n ) implies p a 1 or p a 2 a n. If p a 1 then i = 1 and we are done. If not, then p a 2 (a 3 a n ). Thus p a 2 or p a 3 a n. By continuing this process we will find i such that p a i. 2.2 Norms We have already considered the concept of primes and irreducibility over Z and 2Z. Now we will introduce a new class of numbers that behaves differently when factored. It is represented by a + b x where a, b, x Z. In these numbers we define the concept of a norm as N(a + b x) = a 2 + xb 2. Defining the norm is useful to our consideration of prime numbers because of the following two properties. Theorem Properties of the Norm 1. If a b then N(a) N(b) 2. N(a + b x)n(c + d y) = N((a + b x)(c + d y)) These properties are easy to check if you cannot recall them from the complex numbers. We will use these two ideas to factor 6 over the class of numbers represented by a + b 5. We factor 6 in two ways 6 = 2 3 = (1 + 5)(1 5)

16 16 CHAPTER 2. PRIME NUMBERS Now we will check to see if 6 is prime in the ring a + b 5. We know that (1 + 5) 2 3 Using the definition of the norm we calculate and also calculate It is easy to see that Since N(1 + 5) = = 6 N(2) = 4 and N(3) = and 6 9 N(1 + 5) N(2) or N(3) property 1. of Theorem tells us that and We have proven that 6 is not prime. It is, however, irreducible over a+b 5. To prove irreducibility we must show that if 6 = xy then x or y = ±1 Let Take the norm of both sides to get Thus = S 1 S 2 N(1 + 5) = N(S 1 )N(S 2 ) 6 = N(S 1 )N(S 2 ) Note that the norm of any number is always a positive integer. Thus the possibilities for N(S 1 ) are 1, 2, 3 and 6. By checking each of these possibilities we see that N(S 1 ) = ±1, 6. Assume that N(S 1 ) = a 2 + 5b 2 = 2. We see that b must equal 0 forcing a 2 = 2. There are no integers satisfying this equation so N(S 1 ) 2. By the same logic a 2 + 5b 2 = 3 has no solutions. Again b must equal 0 and we must find an integer such that a 2 = 3. Thus N(S 1 ) 3. If we let a = ±1 and b = ±1, N(S 1 ) = = 6. N(S 1 ) = 6 N(S 2 ) = 1 Thus if 6 = N(S 1 )N(S 2 ), N(S 1 ) or N(S 2 ) must equal ±1. Thus is irreducible over this class of numbers.

17 2.3. THE FUNDAMENTAL THEOREM OF ARITHMETIC The Fundamental Theorem of Arithmetic The Fundamental Theorem of Arithmetic is a very useful theorem in Number Theory that is used over and over again in proofs. This idea is one of the oldest in mathematics and was expressed by Euclid 2300 years ago in The Elements. Just because it s cool math trivia I ll mention that The Elements has appeared in more editions than any other work besides the Bible.(Katz 58) Fundamental Theorem of Arithmetic 1. Every integer except 0 and ±1 can be uniquely written as a product of primes up to order and sign. Up to order and sign means that even though we can factor 6 as 2 3 = 3 2 = ( 2)( 3) = ( 3)( 2) we still count it as a unique factorization. We will prove this theorem by assuming that a number is factored in two ways and then use Theorem to show that the factors must be equivalent to each other. In the following proof pay special attention to the distinction between prime and irreducible. Proof Assume we can factor a number in two ways such that Because p 1 is a prime p 1 p 2 p k = q 1 q 2 q l p 1 q 1 q l i such that p 1 q i Because q i is irreducible, we know that Since p 1 is prime it cannot be ±1 so p 1 = ±1 or ± q i p 1 = ±q i We can then cancel these from our equation p 1 p 2 p k = ±q 1 q 2 q i q l By continuing to cancel out primes in the same manner we show that if there is a factorization it must be unique. We have yet to prove that there exists a factorization for any number, n. If n is irreducible then it is already written as a product of one prime and we are done. Assume that n = a 1 a n If a i is irreducible then leave it. If a i is not irreducible then write a i = b 1 b n. The absolute values of a and b are decreasing. Since we have a decreasing sequence of positive integers it must stop at a prime factorization.

18 18 CHAPTER 2. PRIME NUMBERS Another Proof Csaba is going to send me a reference for this proof that has been very well written by three Hungarians. Assume that there exists two factorizations. If p 1 = q 1 divide and continue. By the Division Algorithm, I m confused about this proof. p 1 p n = q 1 q l n = p 1 q 1 A + B B < p 1 q 1 p 1 B and q 1 B p 1 q 1 < B p 1 B B = p 1 B 1 a P 1 B 1 Order in increasing order 2.4 There are infinitely many primes It has been known for thousands of years that there are infinitely many primes. Although we can not easily find gigantic primes because we have no formula that generates primes, we can show that there are infinitely many in a number of ways. Here is a classic proof first discovered by Euclid in 3 B.C. Theorem There are infinitely many primes Proof Assume that p 1 p 2 p k are the only primes. Construct a new larger number N = p 1 p 2 p n +1. We can easily prove that p N by contradiction. Assume p N. Then p 1 N p 1 p k. This implies p 1 1 which is a contradiction. Since we know that none of our original primes divide N we can write N as the product of new primes not equal to p i for any i. If N = q 1 q l then q 1 is a new prime. To be complete we must check that N ±1 or 0. Since we can list quite a few primes such as 3, 5, 7 we know N must be bigger than 1 and our proof does not have to deal with the problems that might arise if N = 0 or ±1. If N = 0 or ±1 then we cannot assume that it has a prime factorization.

19 2.5. A NUMBER OF COOL RANDOM PRIME FACTS A Number of Cool Random Prime Facts Now that we ve convinced you that there are infinitely many primes it is natural to ask more questions about what prime numbers are like and how often they occur. For example one might notice that = 2 and = 5 and wonder if there are infinitely many primes of the form p = x If you are curious to know the answer to this question, you are out of luck, unless of course you can think of a proof that has evaded the rest of the math community. If you are that smart, you should probably be taking Topics in Number Theory! We might also note that 2! + 1 = 3 and 3! + 1 = 7 and wonder if we could find infinitely many primes of the form p = n! + 1. Unfortunately, mathematicians do not have an answer to this question either, though they can tell you that there are infinitely many composite numbers of the form n! + 1. Asking whether or not there are infinitely many prime numbers of the form a n 1, leads to a number of interesting facts in number theory, even though this problem is also unsolved. Start by noticing that we can factor the difference of squares according to the following useful formula: a n b n = (a b)(a n 1 + a n 2 b + + b n ) Using this formula we see that a n 1 = (a 1)(a n 1 + a n ). Therefore a 1 a n 1. Prime numbers are only divisible by themselves and 1, so if a n 1 has a chance of being prime a 1 = 1 or a 1 = p. If a 1 = p then a 1 = a n 1 and a = a n. In this case a n = 1 and a n 1 = 0. Thus we see that a 1 = 1. It follows that a n 1 = p a = 2. We have found a necessary condition to make a n 1 prime but not a sufficient one = = 15 Obviously, 7 is a prime and 15 is not. Although it is easy to check for small numbers we have to come up with new methods to determine if, for example, is prime. Note that (2 401 ) Based on this example we conjecture that if a n 1 is prime then a = 2 and n is prime. We can show this by noting that 2 ab 1 = (2 a ) b 1 b. This implies

20 20 CHAPTER 2. PRIME NUMBERS that 2 a 1 2 ab 1 b. We still have only a necessary condition and not a sufficient one. For example We don t know if there are infinitely many primes of the form 2 p 1. Primes of this form are called Mersenne primes after the mathematician who first observed them. Insert interesting fact, Mersenne s time period. We have discovered 43 Mersenne primes the biggest one being 2 30??????? 1. At you can join the search for gigantic primes and if your computer finds one that is over 200 digits long you can earn money. Since we have considered primes of the form 2 n 1 it is only natural to ask about primes of the form 2 n + 1. We start our hunt and see that = = = = = 33 Our hunt for primes was moderately successful, yielding 3 and 17. Unfortunately every other number we found was divisible by three. This leads us to conjecture that 3 2 odd + 1. Since we have already checked the base case, we will proceed to prove this fact by induction. Assume Rewrite our equation as Multiply both sides by 4 to get 2 2k = 3l 2 2k+1 = 3l k+1 = 12l 4 Combine the left side using elementary rules of exponents and factor the right side somewhat creatively to get Let 4l 1 = l. Rearranging our equation again 2 2k+2+1 = 3(4l 1) 1 2 2(k+1)+1 = 3l 1 2 2(k+1) = 3l

21 2.5. A NUMBER OF COOL RANDOM PRIME FACTS 21 By induction we have shown that if the condition is true for the odd number 2k + 1 it is true for the next odd number 2(k + 1) + 1. This shows us that if we have any hope of 2 n + 1 being prime n cannot be odd. There are plenty of even values of n, however, that do not yield prime numbers. For example The following identity will be helpful in defining another necessary condition on n. a 2n+1 + b 2n+1 = (a + b)(a 2n a 2n 1 b + + b 2n ) Using this identity we can rewrite as (2 2 ) = ( )( ) so it must be composite. Whenever n has an odd divisor we will always be able to factor it using this identity. Thus if 2 n + 1 is prime n must have no odd divisors. If we let n = 2 k then we are assured that n will have no odd divisor. Primes of the form 2 2k + 1 are called Fermat primes after the amateur mathematician Fermat who conjectured that every number of this form was prime. Unfortunately for Fermat, Euler convincingly disproved his conjecture by discovering that In fact, we have only found 5 Fermat primes and we still don t know if there are infinitely many primes of this form. We denote the kth Fermat number as F k = 2 2k + 1. Although we are not sure how many Fermat primes there are, we can prove interesting and useful properties of the Fermat numbers. Theorem Fermat NumbersAll Fermat numbers are relatively prime to each other or in other words, (F k, F n ) = 1 Proof To prove that the greatest common divisor of two Fermat numbers is 1 we first factor F n 2 then use this factorization in a proof by contradiction. By the definition of Fermat numbers F n 2 = 2 2n We can rewrite this as (2 2n 1 ) It is now possible to factor the expression to yield (2 2n 1 1)(2 2n 1 + 1) Notice that 2 2n 1 1 = F n 1 2 and 2 2n = F n 1. Thus F n 2 = F n 1 (F n 1 2)By continuing to factor in the same way we see that (F n 1 2)(F n 1 ) = (F n 2 2)(F n 2 )F n 1

22 22 CHAPTER 2. PRIME NUMBERS If we continue to factor in this way we arrive at the equation (F 0 2)F 0 F 1 F 2 F n 3 F n 2 F n 1 = F n 2 But we know how to calculate F 0 F 0 2 = (( ) 2) = 1 Thus we can ignore F 0 2 Now we want to prove that all Fermat numbers are relatively prime by contradiction. Assume p F k and p F n. This means that (F n, F k ) = p. If p midf k it must also divide p F 0 F k F n 2 F n 1 because we have simply added on more numbers. From above we know that this number is equal to F n 2. Thus p F n 2 Since p F n and p F n 2 we know p 2. Since p is prime p = 2. But Fermat primes are odd so by contradiction (F n, F k ) = 1 Now we will use this fact to prove our favorite result. Theorem There are Infinitely Many Primes There are more primes in the world than grains of sand. Proof Consider the Fermat numbers F 0, F 1, F 2, F k. Although we do not know if there are infinitely many Fermat primes, it is obvious that there are infinitely many numbers of the form 2 2k + 1 because we can choose infinitely many values for k. Each Fermat number has a prime divisor. Let p 0 F 0, p 1 F 1 and so on. We claim that these are distinct primes and prove it by contradiction. Assume p i F i and p i F j. Then p (F i, F j ). But we have already proved that the greatest common divisor of two Fermat numbers is 1. Hence, there are infinitely many primes. Gigantic Gaps Between Primes Early on in the integers, primes are plentiful and we hardly have to travel far at all to go from on to the next. As we travel further into the integers, however, the frequency of primes decreases and the gaps between them grow larger. In fact, given any integer n we can find a, a + 1,, a + n such that none of them are prime. We know that

23 2.5. A NUMBER OF COOL RANDOM PRIME FACTS 23 (n + 1)! + 2 is composite because 2 (n + 1)! and 2 2. By the same logic we see that (n + 3)! + 3 is composite. This works for any value of i that is less than n. Thus (n + 1)! + i is composite because it is is divisible by i. Our last number that we know for sure is composite is (n + 1)! + n + 1 because n + 1 (n + 1)! + n + 1. We have found n composite numbers in a row. Thus we can find arbitrarily big gaps between prime numbers Canonical Form Because of the Fundamental Theorem of Arithmetic we can write each number as a product of primes. We write n in canonical form as n = p α i i We call this extended canonical form if our exponents α can be equal to zero. In this case we write n as a product of all primes in order and give the ones that are not in the prime factorization an exponent of zero. Theorem Lemma d n if and only if d = p β i i where β i α i Proof If d n then n = d d. Rewriting this in canonical form we see that p α i i = q γ i i r β i i Using basic multiplication rules we see that γ i + β i = α i so β i α i. Using this lemma, we can express the greatest common divisor and least common multiple in canonical form. Theorem Lemma If we can write two numbers in canonical form, we can find the greatest common divisor. If n = p α i i and k = p β i i then (n, k) = p min(α i,β i ) i Proof To show something is the greatest common divisor we must show that it divides both of the numbers. Let d = p min(α i,β i ) i

24 24 CHAPTER 2. PRIME NUMBERS To satisfy the definition we must show d k and d n We know that d divides k and n because of Lemma To prove that it is the greatest common divisor we must also satisfy the second part of the definition. All numbers which divide n and k also divide d. This is true because by Lemma we know that if a number divides n and k then all primes in the canonical expression of our number have exponents less than those in the canonical expression of n and k. Thus the number of primes in the divisor is less than or equal to the minimum of the exponents in n and k. We could also think that the greatest common divisor is d because it is the biggest number that divides both. If we had a number bigger than d then it would have an extra prime in its factorization and it would no longer divide both n and k because it s exponent would be bigger than the minimum value.

25 Chapter 3 Congruences Now it is time to introduce the idea of congruence or equivalently modular arithmetic. This new idea is defined using the idea of divisibility that we have already examined in detail. Analyzing numbers using modular arithmetic will prove very fruitful in number theory. Tell them something else of value here. Definition Congruent We say a b(m) if m a b. In words, a is congruent to b modulo m if and only if they have the same remainder on division by m. It is good to note that is an equivalence relation. a b(m) b a(m) (3.1) a a(m) (3.2) a b(m) and b c(m) a c(m) (3.3) It is easy to understand why these equivalence relations hold when we consider that a is congruent to b when a and b have the same remainder on division by m. For example if a and b have the same remainder when divided by m and b and c have the same remainder on division by m, then a and c must also have the same remainder. Now we will prove that is an equivalence relation formally by using the definition of congruence. Proof (3.1) Prove a a(m). We know that m a a so by our definition of congruent a a(m). (3.2)Prove a b(m) b a(m). Assume a b(m). Thus m a b. By the definition of divides mk = a b. This implies m( k) = b a which means that m b a. By the definition of congruent b a(m). 25

26 26 CHAPTER 3. CONGRUENCES (3.3) Prove a b(m) and b c(m) a c(m). Assume a b(m) and b c(m). Thus, m a b and m b c. Using our division properties we see that m (a b) + (b c) or equivalently m a c. Thus a c(m). 3.1 Properties of Congruences Now we will assume that a b(m) and c d(m) and state and prove a number of useful properties of congruencies. (what word is the best to use here?) a ± c b ± d(m) (3.4) ac bc(m) (3.5) ac bd(m) (3.6) a n b n (m) (3.7) f(a) f(b)(m) where f is a polynomial (3.8) (3.4) To prove Theorem 3.4 note that by assumption we know that m a b and m c d. Thus m (a b) + (c d). By rearranging the terms we see that m (a + c) (b + d). Thus a + c b + d(m). (3.5) To prove Theorem 3.5 note that by assumption m a b so m (a b)c. Thus m ac bd and we have shown that ac bd(m). (3.6) To prove Theorem 3.6 start by assuming that m a b and m c d. Using the same idea as our proof of Theorem 3.5 we can show that m ac bc and m bc bd. Thus m ac bc + bc bd. Cancelling out bc we arrive at m ac bd which implies ac bd(m). (3.7) To prove Theorem 3.7 we apply Theorem 3.6 repeatedly. To begin we say that a b(m). Thus we can also say that aa bb(m) or a 2 b 2 (m). By repeating this process n times we arrive at a n b n (m). (3.8) To prove Theorem 3.8 we just apply the fact that a b a n b n (m) and ac bc(m). Now that you ve made your way through that, I promise that using these rules will be much more exciting than proving them. Now we are going to prove yet another exciting property of congruences. Theorem Cancelling ( Across ) Congruencies If a 0 then ax ay(m) if and only if x y. m (a,m)

27 3.1. PROPERTIES OF CONGRUENCES 27 This theorem is important because it shows us that the normal rules of cancellation do not apply in modular arithmetic. We can only divide by a like usual if (a, m) = 1. In symbols, if (a, m) = 1 then the following statement is true ax ay x y ( ) m Proof Start by assuming that x y Thus by the definition of (a,m) congruent m (a, m) x y If a number divides x y it also divides any multiple of x y so we see that m (a, m) a (x y) (a, m) If we use the original definition of divisibility this means that k m (a, m) = a (x y) (a, m) Now we can use our standard cancellation rules to find Thus km = a(x y) m a(x y) By distributing and applying the definition of congruent again we see that m ax ay ax ay(m) ( We have shown that our Theorem holds in one direction, namely x y implies ax ay(m). Now, assume that ax ay(m). By the definition of congruent we see Factoring we get m ax ay m a(x y) Divide both sides by the g.c.d of a and m m (a, m) a (x y) (a, m) m (a,m) )

28 28 CHAPTER 3. CONGRUENCES With a bit of thought we see that ( ) m (a, m), a = 1 (a, m) By dividing by the g.c.d. we are taking out all the factors a and m have in common. When we take the g.c.d of the new number there are no longer any common divisors. Since the g.c.d of is 1 we know that ( This is equivalent to x y m (a,m) m and (a,m) m (a, m) x y ). a (a,m) Theorem Congruencies and the LCM If we consider two integers x and y modulo m i we know, x y(m i ) if and only if x y([m 1, m k ]) Proof From Page 49 in my textbook If x y(m i ) for i = 1, 2, 3,, r, then m i (y x) for i = 1, 2,, r. That is y x is a common multiple of m 1, m 2,, m r, and therefore [m 1, m 2, m 3,, m r ] (y x). This implies x y(mod[m 1, m 2,, m r ]. Now we will prove the statement the other way. stuff from textbook ends here. Assume that x y([m 1, m 2, m k ]). That means that [m 1, m 2, m k ] x y. We know that m i [m 1, m 2, m k ] so m i x y. Using the definition again we see that x y(m i ). 3.2 Primes of the form 4k 1 Theorem There are Infinitely Many Primes There are infinitely more primes than seconds since the big bang. Now that we have defined the idea of congruence we can use it to prove, yet again, that there are infinitely many primes. But before we start our proof let us consider what the natural numbers look like mod 4. All numbers can be represented as either 4k, 4k + 1, 4k + 2 or 4k + 3 mod 4 because when we divide any number by k it must have a remainder of 0, 1, 2 or 3. Primes must be of the form 4k +1 and 4k +3 since 4 4k and 2 4k +2. For example we have 4(1) + 1 = 5 and 4(0) + 3 = 3. We will prove that there are infinitely

29 3.3. RESIDUE SYSTEMS 29 many primes of the form 4k 1 which is equivalent to primes of the form 4k + 3. This, of course, would imply that there are infinitely many primes. Proof Assume that there are finitely many primes of the form 4k 1. Denote them p 1, p 2, p l. Let N = 4p 1 p l 1 Since N is an integer we can write it as the product of primes. Note that N ±1, 0 because we know that 3 is a prime of the form 4k 1. Let N = q 1 q 2 q k We can show that p i q i by contradiction. Assume p i = q i. This means that p i N p i 4p 1 p l 1 We know that p i 4p 1 p i p l so p i 1. Since p i 1 we have shown by contradiction that p i N. This means that all p i must be distinct from all q i. Assume that all q i are off the wrong form, or q i = 4k + 1. q 1 1(4) q k 1(4) q 1 q 2 q n 1(4) But if we examine N mod 4 we see that N 1(4) Thus there must be at least on q i of the form 4k 1. Thus given any finite number of primes of the form 4k 1 we can always find a new one that is distinct. 3.3 Residue Systems The idea of a residue classes are closely related to congruence. Consider the integers modulo 6. Every number is congruent to 0, 1, 2, 3, 4 or 5 mod 6. For example k + 1(6). All of these numbers are in the same residue class. If we take one element from each residue class it is called a complete residue system. For example 12, 5, 8, 3, 2, 11 is a complete residue system mod 6.

30 30 CHAPTER 3. CONGRUENCES Definition Reduced Residue System A reduced residue system modular m is formed by taking one element from each residue class that is relatively prime to m. The reduced residue class mod 6 is 1, 5 or equivalently 7, 11. We denote the size of a reduced residue system as φ(m). In this definition, we have simply assumed that if 1 and 5 are relatively prime to 6 then every number they are congruent to, such as 7 and 11 are also relatively prime to 6. We must prove this fact to rigourously define a reduced residue system. We must show that (a, m) = 1 and b a(m) (b, m) = 1 Proof Assume b a(m) and (a, m) = 1. By definition we know m b a By the definition of divisibility we see mk = b a Rearranging we get a = b + mk. Now we will use Theorem? which tells us that (a, b) = (a, a + b). This implies that (a, b) = (a, ka + b). (m, b) = (m, km + b) = (m, a) We have already assumed that (m, a) = 1 so since we have shown it is equal to (m, b) we know it is also Wilson s Theorem Wilson s Theorem will prove to be extremely helpful in computing the value of large numbers when we are considering them modulo a prime number. Say something cool about the Theorem. Theorem Wilson s Theorem When p is prime, (p 1)! 1(modp). Proof Note that the size of a reduced residue system mod p has size p 1, or in symbols φ(p) = p 1. Let a 1, a 2, a p 1 be a reduced residue system mod p. We want to show that a 1 a 2 a p 1 1(p). We will begin by pairing up elements, a i and a j such that a i a j 1(p). We cannot just assume that we can find pairs, so we must prove that there is a solution to a i x 1(p)

31 a 2 a WILSON S THEOREM 31 We know that all numbers less than p are relatively prime to p. a 1 a 2 a 3. a ị. a (p 1) First we show that each ai, where i is a number less that p, is a reduced residue class. This means that all ai are relatively prime to p. We know that(where is this reference?) (a, p) = (i, p) = 1 (ai, p) = 1 Thus if a and i are relatively prime to p then so is ai. Now if we can show that these reduced residue classes are distinct we know that we have formed a reduced residue system. We want to show that ai aj unless i = j. Assume that ai aj(p). This means that ai aj 0(p) Factoring we see that a(i j) 0(p). Since (a, p) = 1 we know from Theorem? that i j 0(p) Thus j = i(p). Because each reduced residue class is distinct there exists an i such that ai = 1 We can now pair up our elements such that a i a i = 1 a 1 a 1 a k a k

32 32 CHAPTER 3. CONGRUENCES The only thing that we have to worry about while pairing is the chance that a number might be it s own pair. For example ( 1)( 1) = 1. We do not want to count it twice when multiplying a 1 a 2 a p 1. Numbers who are their own pair are of the form x 2 1(p) By the definition of congruent we see that Factoring we get The definition of prime implies that p x 2 1 p (x + 1)(x 1) p (x + 1) or p (x 1) Converting this back to the language of congruences we see that x is its own pair if and only if x 1(p) or x 1(p) Thus when we are multiplying all the pairs together we must deal with 1 and 1 separately. Excluding 1 and 1 we see that (ai a i) 1(p) Thus once we add in the elements that did not have a pair we see that (1)( 1)(a 1 a 1 a i a i) 1(p) These elements were exactly those numbers less than p so we have proven that indeed (p 1)! 1(p). 3.5 The Euler-Fermat Theorem Now that we have proved Wilson s Theorem, we will state and prove another theorem that will be enormously helpful in making calculations with large numbers. This theorem was first discovered by Fermat and then generalized and proved by Euler. Give dates. Theorem Euler-Fermat Theorem When p is prime, c p 1 1(p). If (c, p) = 1, then c φ(m) 1(m). Fermat discovered the specific case c p c(p).

33 3.5. THE EULER-FERMAT THEOREM 33 We begin by noting a property of reduced residue systems. Assume b 1, b 2,, b φ(m) is a reduced residue system mod m. Let c be an integer such that (c, m) = 1. We will show that cb 1, cb 2,, cb φ(m) is a reduced residue system. Consider cb 1, cb 2 cb m. By assumption we know (c, m) = 1 and because it is a reduced residue class we know (b i, m) = 1. Theorem? tells us that this implies (cb i, m) = 1. Therefore, all elements of cb 1, cb 2 cb m are relatively prime to m. We still must show that all elements are distinct. If two elements of our new system overlap, or in other words, cb i = cb j then we must be missing at least one element and do not have a reduced residue system. Since we have assumed that (c, m) = 1 we can use Theorem to show that b i b j cb i cb j (m) Thus cb 1, cb 2, cb m forms a reduced residue system because, if you disregard the order of the elements b 1, b 2,, b φ(m) = cb 1, cb 2,, cb φ(m) If we multiply each list by itself they will still be equivalent modulo m. Thus b 1 b 2 b φ(m) cb 1 cb 2 cb φ(m) (m) b 1 b 2 b φ(m) b 1 b 2 b φ(m) c φ(m) (m) By dividing through by all b i we see that 1 c φ(m) We can divide across the equivalence sign because (b 1 b 2 b φ(m), m) = 1. When p is prime we have a special case of the Euler Theorem. Since φ(p) = p 1 we can easily see that c p 1 1(p). If we multiply both sides of the congruence by c we arrive at Fermat s formulation c p c(p). Although this fact is unnecessary for the proof of Euler-Fermat, using the exact same reasoning we could show that if a 1, a 2,, a m is a complete residue system modulo m then ca 1, ca 2, ca m is also a complete residue system modulo m as long as (c, m) = 1.

34 34 CHAPTER 3. CONGRUENCES 3.6 Solving Congruences Congruences can help us answer many general questions. For example it can tell us, for which primes p the equation x 2 1(p) has a solution. Deal with case where p = 2. Theorem The equation x 2 p 1(4). 1(p) has a solution if and only if Proof Assume that x 2 1(p). Raise both sides of our congruence to the p 1 power to get 2 (x 2 ) p 1 2 ( 1) p 1 2 (p) Simplifying we see x p 1 ( 1) p 1 2 Because of the Euler-Fermat Theorem we know that x p 1 1(p). Our congruence becomes 1 ( 1) p 1 2 We must raise 1 to an even power to make it equivalent to 1. Thus Solving we see that p 1 2 = 2k p = 4k + 1 We have finished on half of the proof. Namely, if x 2 1(p) has a solution then p 1(4) To illustrate this note 2 2 1(5) 5 2 1(13) Since these equations have solutions, we know 5 and 13 are both primes of the form 4k + 1. To prove the other direction of Theorem we show that if p = 4k + 1 we can always find an explicit solution to the equation x 2 1(p). We start with Wilson s Theorem which gives (p 1)! 1(p) p 1 2 p (p 3)(p 2)(p 1) 1(p)

35 3.6. SOLVING CONGRUENCES 35 Notice that (p 1) 1(p) and (p 2) 2(p). We can match up the numbers in our product so that 1 is matched with (p 1), 2 is matched with (p 2) and so on. We can then rewrite our product as ( ) ( ) p 1 p + 1 1(p 1)2(p 2) 1(p) 2 2 When we consider the numbers mod p it is equivalent to: 1 2 ( 2 2 )( 3 2 ) ( p 1 2 )2 1(p) We have p 1 negatives so we can factor them out and rewrite the sequence 2 as ( ) 2 ( 1) p 1 p (p) 2 This is equal to (( ) ) 2 ( 1) p 1 p 1 2! 2 Since p = 4k + 1, we see that p 1 can be written as 2k and we can therefore 2 ignore the term ( 1) 2k. Thus we see that ( ) p 1 2! 1(p) Therefore if p = 4k + 1 we have explicitly demonstrated a solution to the equation x 2 1(p). Just let x = p 1!. 2 Now we will prove a related lemma. If x 2 1(p) has a solution then it must have two. Assume that x and α are both solutions. Therefore and α 2 1 x 2 α 2 By the definition of congruent we see that Since p is prime Therefore p x 2 α 2 = (x α)(x + α) p (x α) or p (x + α) x α or x α If there is a solution to x 2 1(p) then there must be exactly two.

Elementary Number Theory We begin with a bit of elementary number theory, which is concerned

CONSTRUCTION OF THE FINITE FIELDS Z p S. R. DOTY Elementary Number Theory We begin with a bit of elementary number theory, which is concerned solely with questions about the set of integers Z = {0, ±1,

CHAPTER 5: MODULAR ARITHMETIC

CHAPTER 5: MODULAR ARITHMETIC LECTURE NOTES FOR MATH 378 (CSUSM, SPRING 2009). WAYNE AITKEN 1. Introduction In this chapter we will consider congruence modulo m, and explore the associated arithmetic called

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

It is time to prove some theorems. There are various strategies for doing

CHAPTER 4 Direct Proof It is time to prove some theorems. There are various strategies for doing this; we now examine the most straightforward approach, a technique called direct proof. As we begin, it

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

Chapter 23 Squares Modulo p Revised Version of Chapter 23 We learned long ago how to solve linear congruences ax c (mod m) (see Chapter 8). It s now time to take the plunge and move on to quadratic equations.

Chapter 6. Number Theory. 6.1 The Division Algorithm

Chapter 6 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,

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory

Course notes on Number Theory

Course notes on Number Theory In Number Theory, we make the decision to work entirely with whole numbers. There are many reasons for this besides just mathematical interest, not the least of which is that

Further linear algebra. Chapter I. Integers.

Further linear algebra. Chapter I. Integers. Andrei Yafaev Number theory is the theory of Z = {0, ±1, ±2,...}. 1 Euclid s algorithm, Bézout s identity and the greatest common divisor. We say that a Z divides

11 Ideals. 11.1 Revisiting Z

11 Ideals The presentation here is somewhat different than the text. In particular, the sections do not match up. We have seen issues with the failure of unique factorization already, e.g., Z[ 5] = O Q(

Practice Problems for First Test

Mathematicians have tried in vain to this day to discover some order in the sequence of prime numbers, and we have reason to believe that it is a mystery into which the human mind will never penetrate.-

10 k + pm pm. 10 n p q = 2n 5 n p 2 a 5 b q = p

Week 7 Summary Lecture 13 Suppose that p and q are integers with gcd(p, q) = 1 (so that the fraction p/q is in its lowest terms) and 0 < p < q (so that 0 < p/q < 1), and suppose that q is not divisible

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.

Prime Numbers. Chapter Primes and Composites

Chapter 2 Prime Numbers The term factoring or factorization refers to the process of expressing an integer as the product of two or more integers in a nontrivial way, e.g., 42 = 6 7. Prime numbers are

Is this number prime? Berkeley Math Circle Kiran Kedlaya

Is this number prime? Berkeley Math Circle 2002 2003 Kiran Kedlaya Given a positive integer, how do you check whether it is prime (has itself and 1 as its only two positive divisors) or composite (not

Homework 5 Solutions

Homework 5 Solutions 4.2: 2: a. 321 = 256 + 64 + 1 = (01000001) 2 b. 1023 = 512 + 256 + 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = (1111111111) 2. Note that this is 1 less than the next power of 2, 1024, which

3. QUADRATIC CONGRUENCES 3.1. Quadratics Over a Finite Field We re all familiar with the quadratic equation in the context of real or complex numbers. The formula for the solutions to ax + bx + c = 0 (where

Fractions and Decimals

Fractions and Decimals Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles December 1, 2005 1 Introduction If you divide 1 by 81, you will find that 1/81 =.012345679012345679... The first

Stanford University Educational Program for Gifted Youth (EPGY) Number Theory. Dana Paquin, Ph.D.

Stanford University Educational Program for Gifted Youth (EPGY) Dana Paquin, Ph.D. paquin@math.stanford.edu Summer 2010 Note: These lecture notes are adapted from the following sources: 1. Ivan Niven,

Congruences. Robert Friedman

Congruences Robert Friedman Definition of congruence mod n Congruences are a very handy way to work with the information of divisibility and remainders, and their use permeates number theory. Definition

MODULAR ARITHMETIC. a smallest member. It is equivalent to the Principle of Mathematical Induction.

MODULAR ARITHMETIC 1 Working With Integers The usual arithmetic operations of addition, subtraction and multiplication can be performed on integers, and the result is always another integer Division, on

2 The Euclidean algorithm

2 The Euclidean algorithm Do you understand the number 5? 6? 7? At some point our level of comfort with individual numbers goes down as the numbers get large For some it may be at 43, for others, 4 In

Theorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that. a = bq + r and 0 r < b.

Theorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that a = bq + r and 0 r < b. We re dividing a by b: q is the quotient and r is the remainder,

Lecture 1: Elementary Number Theory

Lecture 1: Elementary Number Theory The integers are the simplest and most fundamental objects in discrete mathematics. All calculations by computers are based on the arithmetical operations with integers

Algebraic Systems, Fall 2013, September 1, 2013 Edition. Todd Cochrane

Algebraic Systems, Fall 2013, September 1, 2013 Edition Todd Cochrane Contents Notation 5 Chapter 0. Axioms for the set of Integers Z. 7 Chapter 1. Algebraic Properties of the Integers 9 1.1. Background

Applications of Fermat s Little Theorem and Congruences

Applications of Fermat s Little Theorem and Congruences Definition: Let m be a positive integer. Then integers a and b are congruent modulo m, denoted by a b mod m, if m (a b). Example: 3 1 mod 2, 6 4

MTH 382 Number Theory Spring 2003 Practice Problems for the Final

MTH 382 Number Theory Spring 2003 Practice Problems for the Final (1) Find the quotient and remainder in the Division Algorithm, (a) with divisor 16 and dividend 95, (b) with divisor 16 and dividend -95,

SUM OF TWO SQUARES JAHNAVI BHASKAR

SUM OF TWO SQUARES JAHNAVI BHASKAR Abstract. I will investigate which numbers can be written as the sum of two squares and in how many ways, providing enough basic number theory so even the unacquainted

EULER S THEOREM. 1. Introduction Fermat s little theorem is an important property of integers to a prime modulus. a p 1 1 mod p.

EULER S THEOREM KEITH CONRAD. Introduction Fermat s little theorem is an important property of integers to a prime modulus. Theorem. (Fermat). For prime p and any a Z such that a 0 mod p, a p mod p. If

Notes on Factoring. MA 206 Kurt Bryan

The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor

Factoring & Primality

Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly

12 Greatest Common Divisors. The Euclidean Algorithm

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan 12 Greatest Common Divisors. The Euclidean Algorithm As mentioned at the end of the previous section, we would like to

Students in their first advanced mathematics classes are often surprised

CHAPTER 8 Proofs Involving Sets Students in their first advanced mathematics classes are often surprised by the extensive role that sets play and by the fact that most of the proofs they encounter are

Homework until Test #2

MATH31: Number Theory Homework until Test # Philipp BRAUN Section 3.1 page 43, 1. It has been conjectured that there are infinitely many primes of the form n. Exhibit five such primes. Solution. Five such

3. Applications of Number Theory

3. APPLICATIONS OF NUMBER THEORY 163 3. Applications of Number Theory 3.1. Representation of Integers. Theorem 3.1.1. Given an integer b > 1, every positive integer n can be expresses uniquely as n = a

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. We begin by defining the ring of polynomials with coefficients in a ring R. After some preliminary results, we specialize

1 Die hard, once and for all

ENGG 2440A: Discrete Mathematics for Engineers Lecture 4 The Chinese University of Hong Kong, Fall 2014 6 and 7 October 2014 Number theory is the branch of mathematics that studies properties of the integers.

Chapter 11 Number Theory

Chapter 11 Number Theory Number theory is one of the oldest branches of mathematics. For many years people who studied number theory delighted in its pure nature because there were few practical applications

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof. Harper Langston New York University

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof Harper Langston New York University Proof and Counterexample Discovery and proof Even and odd numbers number n from Z is called

Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm

MTHSC 412 Section 2.4 Prime Factors and Greatest Common Divisor Greatest Common Divisor Definition Suppose that a, b Z. Then we say that d Z is a greatest common divisor (gcd) of a and b if the following

Quotient Rings and Field Extensions

Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

Algebra for Digital Communication

EPFL - Section de Mathématiques Algebra for Digital Communication Fall semester 2008 Solutions for exercise sheet 1 Exercise 1. i) We will do a proof by contradiction. Suppose 2 a 2 but 2 a. We will obtain

Elementary Number Theory

Elementary Number Theory A revision by Jim Hefferon, St Michael s College, 2003-Dec of notes by W. Edwin Clark, University of South Florida, 2002-Dec L A TEX source compiled on January 5, 2004 by Jim Hefferon,

MODULAR ARITHMETIC KEITH CONRAD. Introduction We will define the notion of congruent integers (with respect to a modulus) and develop some basic ideas of modular arithmetic. Applications of modular arithmetic

Solutions to Homework Set 3 (Solutions to Homework Problems from Chapter 2)

Solutions to Homework Set 3 (Solutions to Homework Problems from Chapter 2) Problems from 21 211 Prove that a b (mod n) if and only if a and b leave the same remainder when divided by n Proof Suppose a

NUMBER THEORY AMIN WITNO

NUMBER THEORY AMIN WITNO ii Number Theory Amin Witno Department of Basic Sciences Philadelphia University JORDAN 19392 Originally written for Math 313 students at Philadelphia University in Jordan, this

Chapter Two. Number Theory

Chapter Two Number Theory 2.1 INTRODUCTION Number theory is that area of mathematics dealing with the properties of the integers under the ordinary operations of addition, subtraction, multiplication and

4. Number Theory (Part 2)

4. Number Theory (Part 2) Terence Sim Mathematics is the queen of the sciences and number theory is the queen of mathematics. Reading Sections 4.8, 5.2 5.4 of Epp. Carl Friedrich Gauss, 1777 1855 4.3.

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

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

9. POLYNOMIALS. Example 1: The expression a(x) = x 3 4x 2 + 7x 11 is a polynomial in x. The coefficients of a(x) are the numbers 1, 4, 7, 11.

9. POLYNOMIALS 9.1. Definition of a Polynomial A polynomial is an expression of the form: a(x) = a n x n + a n-1 x n-1 +... + a 1 x + a 0. The symbol x is called an indeterminate and simply plays the role

SECTION 10-2 Mathematical Induction

73 0 Sequences and Series 6. Approximate e 0. using the first five terms of the series. Compare this approximation with your calculator evaluation of e 0.. 6. Approximate e 0.5 using the first five terms

An Introductory Course in Elementary Number Theory. Wissam Raji

An Introductory Course in Elementary Number Theory Wissam Raji 2 Preface These notes serve as course notes for an undergraduate course in number theory. Most if not all universities worldwide offer introductory

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS John A. Beachy Northern Illinois University 2014 ii J.A.Beachy This is a supplement to Abstract Algebra, Third Edition by John A. Beachy and William D. Blair

ORDERS OF ELEMENTS IN A GROUP

ORDERS OF ELEMENTS IN A GROUP KEITH CONRAD 1. Introduction Let G be a group and g G. We say g has finite order if g n = e for some positive integer n. For example, 1 and i have finite order in C, since

Handout NUMBER THEORY

Handout of NUMBER THEORY by Kus Prihantoso Krisnawan MATHEMATICS DEPARTMENT FACULTY OF MATHEMATICS AND NATURAL SCIENCES YOGYAKARTA STATE UNIVERSITY 2012 Contents Contents i 1 Some Preliminary Considerations

8 Divisibility and prime numbers

8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express

Some facts about polynomials modulo m (Full proof of the Fingerprinting Theorem)

Some facts about polynomials modulo m (Full proof of the Fingerprinting Theorem) In order to understand the details of the Fingerprinting Theorem on fingerprints of different texts from Chapter 19 of the

Mathematics of Cryptography

CHAPTER 2 Mathematics of Cryptography Part I: Modular Arithmetic, Congruence, and Matrices Objectives This chapter is intended to prepare the reader for the next few chapters in cryptography. The chapter

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 5

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 5 Modular Arithmetic One way to think of modular arithmetic is that it limits numbers to a predefined range {0,1,...,N

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Number Theory Divisibility and Primes Definition. If a and b are integers and there is some integer c such that a = b c, then we say that b divides a or is a factor or divisor of a and write b a. Definition

1.3 Polynomials and Factoring

1.3 Polynomials and Factoring Polynomials Constant: a number, such as 5 or 27 Variable: a letter or symbol that represents a value. Term: a constant, variable, or the product or a constant and variable.

There are 8000 registered voters in Brownsville, and 3 8. of these voters live in

Politics and the political process affect everyone in some way. In local, state or national elections, registered voters make decisions about who will represent them and make choices about various ballot

PROBLEM SET 6: POLYNOMIALS

PROBLEM SET 6: POLYNOMIALS 1. introduction In this problem set we will consider polynomials with coefficients in K, where K is the real numbers R, the complex numbers C, the rational numbers Q or any other

Problem Set 7 - Fall 2008 Due Tuesday, Oct. 28 at 1:00

18.781 Problem Set 7 - Fall 2008 Due Tuesday, Oct. 28 at 1:00 Throughout this assignment, f(x) always denotes a polynomial with integer coefficients. 1. (a) Show that e 32 (3) = 8, and write down a list

Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and

Breaking The Code Ryan Lowe Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and a minor in Applied Physics. As a sophomore, he took an independent study

The Laws of Cryptography Cryptographers Favorite Algorithms

2 The Laws of Cryptography Cryptographers Favorite Algorithms 2.1 The Extended Euclidean Algorithm. The previous section introduced the field known as the integers mod p, denoted or. Most of the field

MATH10040 Chapter 2: Prime and relatively prime numbers

MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive

Integer Factorization using the Quadratic Sieve

Integer Factorization using the Quadratic Sieve Chad Seibert* Division of Science and Mathematics University of Minnesota, Morris Morris, MN 56567 seib0060@morris.umn.edu March 16, 2011 Abstract We give

Lecture 13 - Basic Number Theory.

Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted

This section demonstrates some different techniques of proving some general statements.

Section 4. Number Theory 4.. Introduction This section demonstrates some different techniques of proving some general statements. Examples: Prove that the sum of any two odd numbers is even. Firstly you

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,

Review for Final Exam

Review for Final Exam Note: Warning, this is probably not exhaustive and probably does contain typos (which I d like to hear about), but represents a review of most of the material covered in Chapters

CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

Solutions to Practice Problems

Solutions to Practice Problems March 205. Given n = pq and φ(n = (p (q, we find p and q as the roots of the quadratic equation (x p(x q = x 2 (n φ(n + x + n = 0. The roots are p, q = 2[ n φ(n+ ± (n φ(n+2

Unique Factorization

Unique Factorization Waffle Mathcamp 2010 Throughout these notes, all rings will be assumed to be commutative. 1 Factorization in domains: definitions and examples In this class, we will study the phenomenon

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Discrete Mathematics, Chapter 4: Number Theory and Cryptography Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 4 1 / 35 Outline 1 Divisibility

The Division Algorithm for Polynomials Handout Monday March 5, 2012

The Division Algorithm for Polynomials Handout Monday March 5, 0 Let F be a field (such as R, Q, C, or F p for some prime p. This will allow us to divide by any nonzero scalar. (For some of the following,

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

it is easy to see that α = a

21. Polynomial rings Let us now turn out attention to determining the prime elements of a polynomial ring, where the coefficient ring is a field. We already know that such a polynomial ring is a UF. Therefore

k, then n = p2α 1 1 pα k

Powers of Integers An integer n is a perfect square if n = m for some integer m. Taking into account the prime factorization, if m = p α 1 1 pα k k, then n = pα 1 1 p α k k. That is, n is a perfect square

Section 6-2 Mathematical Induction

6- Mathematical Induction 457 In calculus, it can be shown that e x k0 x k k! x x x3!! 3!... xn n! where the larger n is, the better the approximation. Problems 6 and 6 refer to this series. Note that

If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C?

Problem 3 If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C? Suggested Questions to ask students about Problem 3 The key to this question

Factoring Polynomials

Factoring Polynomials Sue Geller June 19, 2006 Factoring polynomials over the rational numbers, real numbers, and complex numbers has long been a standard topic of high school algebra. With the advent

CLASS 3, GIVEN ON 9/27/2010, FOR MATH 25, FALL 2010

CLASS 3, GIVEN ON 9/27/2010, FOR MATH 25, FALL 2010 1. Greatest common divisor Suppose a, b are two integers. If another integer d satisfies d a, d b, we call d a common divisor of a, b. Notice that as

On Generalized Fermat Numbers 3 2n +1

Applied Mathematics & Information Sciences 4(3) (010), 307 313 An International Journal c 010 Dixie W Publishing Corporation, U. S. A. On Generalized Fermat Numbers 3 n +1 Amin Witno Department of Basic

APPLICATIONS OF THE ORDER FUNCTION

APPLICATIONS OF THE ORDER FUNCTION LECTURE NOTES: MATH 432, CSUSM, SPRING 2009. PROF. WAYNE AITKEN In this lecture we will explore several applications of order functions including formulas for GCDs and

Chapter 2 Remodulization of Congruences Proceedings NCUR VI. è1992è, Vol. II, pp. 1036í1041. Jeærey F. Gold Department of Mathematics, Department of Physics University of Utah Don H. Tucker Department

SECTION 0.6: POLYNOMIAL, RATIONAL, AND ALGEBRAIC EXPRESSIONS

(Section 0.6: Polynomial, Rational, and Algebraic Expressions) 0.6.1 SECTION 0.6: POLYNOMIAL, RATIONAL, AND ALGEBRAIC EXPRESSIONS LEARNING OBJECTIVES Be able to identify polynomial, rational, and algebraic

Section 4.2: The Division Algorithm and Greatest Common Divisors

Section 4.2: The Division Algorithm and Greatest Common Divisors The Division Algorithm The Division Algorithm is merely long division restated as an equation. For example, the division 29 r. 20 32 948

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

STUDY GUIDE FOR SOME BASIC INTERMEDIATE ALGEBRA SKILLS

STUDY GUIDE FOR SOME BASIC INTERMEDIATE ALGEBRA SKILLS The intermediate algebra skills illustrated here will be used extensively and regularly throughout the semester Thus, mastering these skills is an

The last three chapters introduced three major proof techniques: direct,

CHAPTER 7 Proving Non-Conditional Statements The last three chapters introduced three major proof techniques: direct, contrapositive and contradiction. These three techniques are used to prove statements

Primality - Factorization

Primality - Factorization Christophe Ritzenthaler November 9, 2009 1 Prime and factorization Definition 1.1. An integer p > 1 is called a prime number (nombre premier) if it has only 1 and p as divisors.

Some Polynomial Theorems. John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 rkennedy@ix.netcom.

Some Polynomial Theorems by John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA 90405 rkennedy@ix.netcom.com This paper contains a collection of 31 theorems, lemmas,

Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.

Algebra 2 - Chapter Prerequisites Vocabulary Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any. P1 p. 1 1. counting(natural) numbers - {1,2,3,4,...}