1 Overview and revision
|
|
- Brenda Bradford
- 5 years ago
- Views:
Transcription
1 MTH6128 Number Theory Notes 1 Spring 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 to Algebra. 1.1 Overview Number theory is about properties of the natural numbers, integers, or rational numbers, such as the following: Given a natural number n, is it prime or composite? If it is composite, how can we factorise it? How many solutions do equations like x 2 + y 2 = n or x n + y n = z n have for fixed n, where the variables are required to be natural numbers? How closely can we approximate a given irrational number by rational numbers which are not too complicated? How many primes are there less than (or any other bound we might choose)? Are more primes of the form 4k + 1 than 4k 1, or vice versa? Some of these questions are interesting because properties of numbers have fascinated humans for thousands of years. On the other hand, some of them (such as primality testing and factorisation) are of very great practical importance: the secret codes that keep internet commerce secure depend on properties of numbers such as primality, factorisation, and modular arithmetic. Not all these questions will be covered in the course. But here are some problems, which turn out to be closely related to one another, which we will consider. Let p be an odd prime number. 1
2 Can we express p in the form x 2 + y 2 for some natural numbers x and y? (For example, 13 = , but 19 cannot be written in this form, as you can check.) Given a natural number a, is it congruent to the square of a number x modulo p? How do we tell? (For example, (mod 13), but there is no solution to 1 x 2 (mod 19).) Does the equation x 2 py 2 = 1 have a solution? What about x 2 py 2 = 1? For example, = 1, but there is no solution to x 2 19y 2 = 1. How closely can p be approximated by a rational number? For example, 2 is approximately equal to /100000, but 1393/985 is an even better approximation, and has much smaller numerator and denominator. How does one find such good approximations? 1.2 Euclid s algorithm We will always count 0 as being a natural number. We recall that, if a and b are natural numbers and b > 0, then there exist unique natural numbers q and r such that a = bq + r, with 0 r < b. The numbers q and r are the quotient and remainder when a is divided by b. We sometimes write q = adiv b and r = amodb. If amodb = 0, we say that b divides a and write b a. Note: Don t confuse a b with a/b. The first, a b, is a relation which is true if a divides b and false otherwise. The second, a/b, is a number. It is correct to say that, if a and b are integers and a 0, then a b holds if and only if b/a is an integer. But 0 0 is true (WHY??), whereas 0/0 is meaningless. The greatest common divisor gcd(a, b) of two integers a and b is the natural number d characterised by the following properties: d a and d b; if e is a natural number satisfying e a and e b, then e d. So, for example, gcd(4, 6) = 2, because 2 4 and 2 6; the only numbers that divide both 4 and 6 are ±1 and ±2, and they all divide 2. 2
3 If we were using all the integers instead of just the natural numbers, then 2 would also be a correct answer to gcd(4, 6). We usually just take the positive value, but the negative value works too. We have gcd(0, 0) = 0 and indeed gcd(n, 0) = n for any integer n. (WHY?) Euclid s algorithm is a procedure for finding the greatest common divisor of two natural numbers a and b. It can be written as a function gcd(a, b), defined recursively as follows: { a if b = 0, gcd(a, b) = gcd(b, a mod b) if b 0. Example Find gcd(225, 157). Here is the calculation: So gcd(225, 157) = = = = = = The Euclidean algorithm also finds integers u and v such that gcd(a, b) = ua + vb. In the above example, we can work back up the chain: 1 = = 21 ( ) 4 = = ( ) = = ( ) 30 = So we have u = 30, v = 43. Actually, for a natural number d, the following equivalence holds: d = gcd(a, b) if and only if d a, d b and there exist integers u, v with d = ua + vb. 1.3 Primes and factorisation A natural number p is said to be prime if p > 1 and, whenever p = ab holds for some natural numbers a and b, we have either a = p, b = 1, or a = 1, b = p. In 3
4 other words, p is prime if its only factors in the natural numbers are itself and 1, and these factors are different. We are going to show that every positive integer greater than 1 can be factorised into primes, and the factorisation is unique up to the possibility of writing the factors in a different order (e.g. 26 = 2 13 = 13 2). This important result is sometimes called the Fundamental Theorem of Arithmetic. To prove this result we will the following result known as Bezout s identity which was proved in Introduction to Algebra Proposition 1.1 (Bezout s identity) Given a, b Z there exist integers u, v such that au + bv = gcd(a, b). The proof of the proposition can be found in the Introduction to Algebra notes on the course QMPlus page, additionally, an alternative proof is given in Appendix 1.7 so that the notes are self-contained. The fact that 1 is not counted as being prime is a convention, but is needed in order for unique factorisation to hold. (If we allowed 1 to be prime, then 6 = 2 3 = = = would have infinitely many prime factorisations!) Lemma 1.2 Let p be prime. If p ab, then p a or p b. Proof Suppose that p does not divide a. Since the only divisors of p are 1 and p, and p doesn t divide a, we must have gcd(a, p) = 1, so there exist integers u and v with ua + vp = 1. Now b = uab + vpb; and p divides uab (since it divides ab by assumption) and p divides vpb; so p divides their sum, which is b. This result immediately extends to products of more than two factors: Lemma 1.3 Let p be prime. If p a 1 a 2 a n, then p a i for some i (1 i n). The idea behind the proof is simple. By the previous lemma, either p a 1 or p a 2 a n. In the first case, we are finished; in the second case, either p a 2 or p a 3 a n ; continue like this until we find p a i for some i. Exercise Write down a careful proof by induction of this lemma. Theorem 1.4 (The Fundamental Theorem of Arithmetic) Any natural number greater than 1 can be written as a product of prime numbers, and this product expression is unique apart from re-ordering the factors. 4
5 Proof We show the existence of a factorisation into primes by induction. Given a natural number n, if n is prime, then it is the product of just one prime. (This starts the induction at n = 2, and is also part of the inductive step.) Otherwise, n has a factorisation n = ab with a, b < n. By the induction hypothesis (since both a and b are greater than 1 but smaller than n), they have factorisations into primes; putting them together we have a factorisation of n. For the uniqueness, we use our lemmas. Suppose that n = p 1 p 2 p r = q 1 q 2 q s, where p 1, p 2,..., p r, q 1, q 2,..., q s are primes. Clearly p 1 divides q 1 q 2 q s ; by the second lemma, p 1 q i for some i (1 i s). By re-ordering the qs if necessary, we can assume that p 1 divides q 1, whence p 1 = q 1 since q 1 is prime. Now we can cancel off the first factor from both sides and continue the process, until we have shown that the two factorisations are the same. 1.4 Congruences and modular arithmetic Let n > 0 be a natural number. We say that two integers a and b are congruent modulo n if n divides a b. We write this as a b (mod n). Note that this is a slightly different use of the word mod from the one we used earlier to denote the remainder. Thus a mod n is a number: it is the remainder when a is divided by n. But a b (mod n) is a statement which may be true or false. Note that, in the notation a b (mod n), and mod go together, like and dx in calculus; you can t have one without the other. The two usages are closely connected: two numbers are congruent modulo n if and only if they leave the same remainder when they are divided by n. I will try to use the convention of putting brackets in the expression a b (mod n). Congruence modulo n is an equivalence relation; the equivalence classes are called congruence classes modulo n. There are exactly n congruence classes, corresponding to the n possible remainders (0, 1,..., n 1) we could obtain when we divide a number by n. We denote by [a] n the congruence class modulo n containing a, and by Z n the set of congruence classes modulo n. The set Z n is a ring, in fact a commutative ring with identity; this means that congruence classes can be added or multiplied, by the rules [a] n + [b] n = [a + b] n, [a] n [b] n = [ab] n, 5
6 and the usual laws (commutative, associative, distributive, identity, and additive inverse laws) hold. See the Introduction to Algebra lecture notes if you need a reminder about this. Here are the addition and multiplication tables of Z 4. I have written the entries in the tables as a rather than [a] 4 to save clutter. Remember that [1] 4 is an infinite set (it consists of all numbers congruent to 1 (mod 4), that is, [1] 4 = {..., 11, 7, 3, 1, 5, 9, 13,...}), but we treat it like a single object in the tables below Proposition 1.5 If p is prime, then Z p is a field; that is, all non-zero elements (elements which are not equal to [0] p ) have multiplicative inverses. Proof Suppose that [a] p is a non-zero element of Z p. This means [a] p [0] p, so p does not divide a. Since p is prime, gcd(a, p) = 1. By Euclid s algorithm, there are integers u and v satisfying ua + vp = 1. This means that ua 1 (mod p), so that [u] p [a] p = [1] p. So [u] p is the inverse of [a] p. For example, take p = 157. What is the inverse of [225] 157? Our earlier calculation showed that = 1, so that the required inverse is [ 30] 157 = [127] 157. As a consequence we prove Fermat s Little Theorem: Theorem 1.6 Let p be a prime number. Then n p n (mod p) for any natural number n. Proof If n 0 (mod p), then the conclusion is certainly true; so suppose not. Then [n] p is an element of the multiplicative group of non-zero elements of Z p. By Lagrange s Theorem (see the Introduction to Algebra notes), the order of this element divides the order of the group, which is p 1. So ([n] p ) p 1 = [1] p, or in other words, n p 1 1 (mod p). Multiplying both sides by n gives the result. 6
7 Exercise Prove Fermat s Little Theorem by induction on n. Fermat s Little Theorem shows that it is possible to show that a number n is composite without finding any factors of n. If we calculate a n mod n and the answer comes out to be different from amodn, then we know that n is composite. Example (mod 2047), so 2047 is not prime. The computation is not as bad as it might appear. Since 2048 = 2 11, we can work out mod 2047 by successive squaring (all congruences mod 2047): 3 1 = = = 9 2 = = 81 2 = = So we cannot have , since if it were then would be congruent to 9. Thus 2047 is not prime. In fact, if we need to, we can find what is congruent to. We have to take and divide by 3, or (what is the same thing, multiply by the inverse of 3 (mod 2047)). At the end of this section I will explain how to use Euclid s algorithm to do this. Some people found this puzzling. For example, 3 8 = (3 4 ) 2 = 81 2 = 6561, and the remainder when 6561 is divided by 2047 is 420, since = 420. Note that the successive squaring method avoids having to compute very large numbers. We can evaluate by just eleven squaring operations of numbers smaller than 2047 together with taking the remainder mod No number in the calculation is larger than , so this is a very practical method! 7
8 Unfortunately, it doesn t always work. If we had used 2 rather than 3, we would have found that (mod 2047). The converse of Fermat s Little Theorem is false! Note: Inverses mod n In the calculation above, we had a congruence modulo 2047 and we wanted to divide by 3. We can use Euclid s algorithm for this purpose. Observation: Let gcd(a, n) = 1. Then there is x such that ax 1 (mod n). Proof Euclid tells us that there exist x and y such that ax + ny = 1. Now this says that ax and 1 differ by a multiple of n; that is, that ax 1 (mod n). In our example, we want an inverse of 3 (mod 2047). We find that = 1, so the required inverse is Thus (mod 2047). 1.5 The Chinese Remainder Theorem The Chinese Remainder Theorem is about solving simultaneous congruences to different moduli. We say that m and n are coprime if gcd(m, n) = 1. Theorem 1.7 Let m and n be coprime natural numbers, and let a and b be arbitrary integers. Then there is a solution to the simultaneous congruences x a (mod m), x b (mod n). Moreover, the solution is unique modulo mn; that is, if x 1 and x 2 are two solutions, then x 1 x 2 (mod mn). Proof have Since gcd(m, n) = 1, there are integers u and v with um + vn = 1. We vn 1 (mod m), um 0 (mod m), vn 0 (mod n), um 1 (mod n). Now let x = umb + vna. 8
9 Then x vna a (mod m), and x umb b (mod n), as required. If x 1 and x 2 are two solutions, then x 1 a x 2 (mod m) and x 1 b x 2 (mod n). So both m and n divide x 1 x 2. Since m and n are coprime, mn divides x 1 x 2, so that x 1 x 2 (mod mn) as required. The proof is constructive: use Euclid s algorithm to find u and v, and then use the formula. But I don t recommend that you memorise the formula, since the method is so simple to work out. This can be extended to an arbitrary number of congruences to pairwise coprime moduli. We say that n 1,..., n r are pairwise coprime if gcd(n i, n j ) = 1 for all i j. Now, if n 1,..., n r are pairwise coprime, and a 1,..., a r are arbitrary integers, then the congruences x a i (mod n i ), i = 1,..., r have a unique solution modulo n 1 n 2 n r. We can find the solution by first replacing the two congruences x a 1 (mod n 1 ) and x a 2 (mod n 2 ) by a single congruence modulo n 1 n 2, and then continuing with the r 1 pairwise coprime numbers n 1 n 2, n 3,..., n r. Example Find all numbers congruent to 2 (mod 3), 1 (mod 4) and 3 (mod 5). The theorem shows that there is a unique solution mod 60, which can be found by trial and error, or systematically as in the proof, which we do here. Since 3+4 = 1, the number = 5 satisfies the first two congruences. (We have m = 3, n = 4, a = 2, b = 1, u = 1, v = 1, so umb + vna = 5.) Now we look for a number congruent to 5 (mod 12) and 3 (mod 5). We have = 1, so the solution is = 53. (Here m = 12, n = 5, a = 5, b = 3, u = 2, v = 5.) So the general solution is the congruence class [53] 60 (all numbers congruent to 53 (mod 60)). 1.6 And finally... Remember Euclid s famous proof of the existence of infinitely many primes, which you will find in the Introduction to Algebra notes. It is possible to adapt Euclid s method for other purposes. Here is an example. Note that, apart from 2, all primes are odd, and so are of one or other of the forms 4k + 1 and 4k 1 for some natural number k. That is, congruent to +1 or 1 (mod 4). Theorem 1.8 There are infinitely many primes congruent to 1 (mod 4). 9
10 Proof Suppose that there are only finitely many such primes, say q 1,..., q n. Consider the number N = 4q 1 q n 1. We know that N can be factorised into prime factors. (This allows the possibility that N is itself prime.) But 2 is not a factor of N, since it is odd; and q 1,..., q n are not factors of N, since it is one less than a multiple of each of these primes. But we supposed that q 1,..., q n are all the primes congruent to 1 (mod 4); so all the prime factors of N must be congruent to +1 (mod 4). However, the product of numbers congruent to +1 (mod 4) is itself congruent to +1 (mod 4) [since, for example, (4k +1)(4l +1) = 4m+1, where m = 4kl +k +l]; so N is congruent to +1 (mod 4). This is a contradiction, since by construction N is congruent to 1 (mod 4). The contradiction shows that the assumption that there are only finitely many primes congruent to 1 (mod 4) is false; that is, there are infinitely many such primes. It is also true that there are infinitely many primes congruent to +1 (mod 4), (and indeed, roughly equal numbers of the two forms below any given bound), but these things are more difficult to prove. We will see that there are infinitely many later in the course. Question: What goes wrong with the above argument if we try to apply it for primes congruent to +1 (mod 4)? 1.7 Appendix: The division algorithm and Bezout s identity One of the most fundamental questions about the multiplicative structure of the integers is: Is the factorisation of integers into primes unique? While, intuitively it may seem obvious that the answer is yes, it turns out that this problem contains much subtlety. For instance, consider and notice that Z[ 5] = {a + b 5 : a, b Z} 6 = 2 3 = (1 + 5)(1 5). Hence, 6 factors in two different ways. To begin we recall the division algorithm Proposition 1.9 Let a, b Z with b > 0. There exist unique q, r Z such that 0 r < b and a = bq + r. 10
11 Proof Let S = {a + nb : n Z & a + nb 0}. (Existence) Note that S is non-empty so we may let r denote the smallest element of S, r = a qb 0. If r b then r b = a (q + 1)b 0 which contradicts the minimality of r. (Uniqueness) Suppose a = bq + r with 0 r < b and there exist q, r such that a = bq + r with 0 r < b. Then r = a bq S so r r and it follows q q so we can write q = q m for some integer m 0. So that r = a bq = a b(q m) = r + mb < b, since r S. This implies m = 0 so that q = q and r = r. From this it follows that if a = qb + r then gcd(a, b) = gcd(b, r), which is a key point to the Euclidean Algorithm. To see this write g = gcd(a, b) and h = gcd(b, r). So g a bq = r g h Also h qb + r = a h g so that h = g. Before completing the proof of Bezout s Identity we ll prove Lemma 1.10 For a, b, n Z we have gcd(an, bn) = n gcd(a, b). Proof For simplicity we ll only consider the case a b > 0. The proof is by induction on l = a + b (Base Case, l = 2) Assume that a + b = 2, then a = b = 1 so that gcd(na, nb) = gcd(n, n) = n. (Inductive step) By the induction hypothesis gcd(rn, sn) = n gcd(r, s) for 2 r + s < l. Applying the division algorithm there exist unique q, r such that a = bq + r so an = bnq + rn. Also, b + r a < a + b. Hence we can apply the inductive hypothesis to conclude 11
12 gcd(an, bn) = gcd(bn, rn) = n gcd(b, r) = n gcd(a, b). We are now ready to prove Bezout s Identity, Proposition 1.1. Proof [Proof of Bezout s Identity, Proposition 1.1] Let I = {au + bv : u, v Z} and let h be the smallest positive element of I. Write g = gcd(a, b) and observe that since g a and g b that g h. Next, apply the division algorithm to a, h, so that there exists 0 r h 1 so that r = a qh = a q(au + bv) = a(1 qu) + b( vq) I. By minimality of h this implies r = 0 so that h a. By a similar argument it follows that h b. Since h a and h b we get that h g. Since h g and g h we conclude g = h which means there exist u, v such that au + bv = g. 12
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 information2x 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 informationCHAPTER 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 information2x 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 informationCOMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635
COMP239: Mathematics for Computer Science II Prof. Chadi Assi assi@ciise.concordia.ca EV7.635 The Euclidean Algorithm The Euclidean Algorithm Finding the GCD of two numbers using prime factorization is
More informationNumber 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 informationAn integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.
Chapter 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. If n > 1
More informationBasic 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 informationBasic 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 information1. 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 informationALGEBRA. 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 informationLecture 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 informationDirect 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 informationNumber Theory and Group Theoryfor Public-Key Cryptography
Number Theory and Group Theory for Public-Key Cryptography TDA352, DIT250 Wissam Aoudi Chalmers University of Technology November 21, 2017 Wissam Aoudi Number Theory and Group Theoryfor Public-Key Cryptography
More information4 Number Theory and Cryptography
4 Number Theory and Cryptography 4.1 Divisibility and Modular Arithmetic This section introduces the basics of number theory number theory is the part of mathematics involving integers and their properties.
More informationLecture 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 informationNUMBER 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 informationINTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.
INTEGERS PETER MAYR (MATH 2001, CU BOULDER) In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes. 1. Divisibility Definition. Let a, b
More informationChapter 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 information3 The fundamentals: Algorithms, the integers, and matrices
3 The fundamentals: Algorithms, the integers, and matrices 3.4 The integers and division This section introduces the basics of number theory number theory is the part of mathematics involving integers
More information1. Factorization Divisibility in Z.
8 J. E. CREMONA 1.1. Divisibility in Z. 1. Factorization Definition 1.1.1. Let a, b Z. Then we say that a divides b and write a b if b = ac for some c Z: a b c Z : b = ac. Alternatively, we may say that
More informationSome Facts from Number Theory
Computer Science 52 Some Facts from Number Theory Fall Semester, 2014 These notes are adapted from a document that was prepared for a different course several years ago. They may be helpful as a summary
More informationThis 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 information11 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 informationMATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.
MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences. Congruences Let n be a postive integer. The integers a and b are called congruent modulo n if they have the same
More informationBeautiful 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 informationMATH 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 informationDefinition 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 information8 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 informationRings and modular arithmetic
Chapter 8 Rings and modular arithmetic So far, we have been working with just one operation at a time. But standard number systems, such as Z, have two operations + and which interact. It is useful to
More informationNOTES ON SIMPLE NUMBER THEORY
NOTES ON SIMPLE NUMBER THEORY DAMIEN PITMAN 1. Definitions & Theorems Definition: We say d divides m iff d is positive integer and m is an integer and there is an integer q such that m = dq. In this case,
More information2 Elementary number theory
2 Elementary number theory 2.1 Introduction Elementary number theory is concerned with properties of the integers. Hence we shall be interested in the following sets: The set if integers {... 2, 1,0,1,2,3,...},
More informationWORKSHEET 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 information5: The Integers (An introduction to Number Theory)
c Oksana Shatalov, Spring 2017 1 5: The Integers (An introduction to Number Theory) The Well Ordering Principle: Every nonempty subset on Z + has a smallest element; that is, if S is a nonempty subset
More informationLecture 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 informationMa/CS 6a Class 2: Congruences
Ma/CS 6a Class 2: Congruences 1 + 1 5 (mod 3) By Adam Sheffer Reminder: Public Key Cryptography Idea. Use a public key which is used for encryption and a private key used for decryption. Alice encrypts
More informationLecture 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 informationNotes on Systems of Linear Congruences
MATH 324 Summer 2012 Elementary Number Theory Notes on Systems of Linear Congruences In this note we will discuss systems of linear congruences where the moduli are all different. Definition. Given the
More informationCMPUT 403: Number Theory
CMPUT 403: Number Theory Zachary Friggstad February 26, 2016 Outline Factoring Sieve Multiplicative Functions Greatest Common Divisors Applications Chinese Remainder Theorem Factoring Theorem (Fundamental
More informationCourse 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 informationChapter 5: The Integers
c Dr Oksana Shatalov, Fall 2014 1 Chapter 5: The Integers 5.1: Axioms and Basic Properties Operations on the set of integers, Z: addition and multiplication with the following properties: A1. Addition
More informationMATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology.
MATH 501 Discrete Mathematics Lecture 6: Number theory Prof. Dr. Slim Abdennadher, slim.abdennadher@guc.edu.eg German University Cairo, Department of Media Engineering and Technology 1 Number theory Number
More informationCHAPTER 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 informationGreatest Common Divisor MATH Greatest Common Divisor. Benjamin V.C. Collins, James A. Swenson MATH 2730
MATH 2730 Greatest Common Divisor Benjamin V.C. Collins James A. Swenson The world s least necessary definition Definition Let a, b Z, not both zero. The largest integer d such that d a and d b is called
More informationLECTURE 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 information2. THE EUCLIDEAN ALGORITHM More ring essentials
2. THE EUCLIDEAN ALGORITHM More ring essentials In this chapter: rings R commutative with 1. An element b R divides a R, or b is a divisor of a, or a is divisible by b, or a is a multiple of b, if there
More informationChapter 1 A Survey of Divisibility 14
Chapter 1 A Survey of Divisibility 14 SECTION C Euclidean Algorithm By the end of this section you will be able to use properties of the greatest common divisor (gcd) obtain the gcd using the Euclidean
More informationChapter 5. Modular arithmetic. 5.1 The modular ring
Chapter 5 Modular arithmetic 5.1 The modular ring Definition 5.1. Suppose n N and x, y Z. Then we say that x, y are equivalent modulo n, and we write x y mod n if n x y. It is evident that equivalence
More information4 Powers of an Element; Cyclic Groups
4 Powers of an Element; Cyclic Groups Notation When considering an abstract group (G, ), we will often simplify notation as follows x y will be expressed as xy (x y) z will be expressed as xyz x (y z)
More informationMTH 346: The Chinese Remainder Theorem
MTH 346: The Chinese Remainder Theorem March 3, 2014 1 Introduction In this lab we are studying the Chinese Remainder Theorem. We are going to study how to solve two congruences, find what conditions are
More information4.4 Solving Congruences using Inverses
4.4 Solving Congruences using Inverses Solving linear congruences is analogous to solving linear equations in calculus. Our first goal is to solve the linear congruence ax b pmod mq for x. Unfortunately
More informationThe following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers:
Divisibility Euclid s algorithm The following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers: Divide the smaller number into the larger, and
More informationMath 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 informationElementary Algebra Chinese Remainder Theorem Euclidean Algorithm
Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm April 11, 2010 1 Algebra We start by discussing algebraic structures and their properties. This is presented in more depth than what we
More informationApplied 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 informationNumber theory (Chapter 4)
EECS 203 Spring 2016 Lecture 10 Page 1 of 8 Number theory (Chapter 4) Review Questions: 1. Does 5 1? Does 1 5? 2. Does (129+63) mod 10 = (129 mod 10)+(63 mod 10)? 3. Does (129+63) mod 10 = ((129 mod 10)+(63
More informationCourse 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 information18 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 informationKnow 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 informationElementary 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 informationMATH FINAL EXAM REVIEW HINTS
MATH 109 - FINAL EXAM REVIEW HINTS Answer: Answer: 1. Cardinality (1) Let a < b be two real numbers and define f : (0, 1) (a, b) by f(t) = (1 t)a + tb. (a) Prove that f is a bijection. (b) Prove that any
More informationElementary 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 informationA 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 informationNOTES ON INTEGERS. 1. Integers
NOTES ON INTEGERS STEVEN DALE CUTKOSKY The integers 1. Integers Z = {, 3, 2, 1, 0, 1, 2, 3, } have addition and multiplication which satisfy familar rules. They are ordered (m < n if m is less than n).
More informationChapter 5.1: Induction
Chapter.1: Induction Monday, July 1 Fermat s Little Theorem Evaluate the following: 1. 1 (mod ) 1 ( ) 1 1 (mod ). (mod 7) ( ) 8 ) 1 8 1 (mod ). 77 (mod 19). 18 (mod 1) 77 ( 18 ) 1 1 (mod 19) 18 1 (mod
More informationNumber Theory Solutions Packet
Number Theory Solutions Pacet 1 There exist two distinct positive integers, both of which are divisors of 10 10, with sum equal to 157 What are they? Solution Suppose 157 = x + y for x and y divisors of
More information4 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 informationAll variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.
Math 152, Problem Set 2 solutions (2018-01-24) All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. 1. Let us look at the following equation: x 5 1
More informationA SURVEY OF PRIMALITY TESTS
A SURVEY OF PRIMALITY TESTS STEFAN LANCE Abstract. In this paper, we show how modular arithmetic and Euler s totient function are applied to elementary number theory. In particular, we use only arithmetic
More informationIntroduction to Number Theory
Introduction to Number Theory CS1800 Discrete Structures; notes by Virgil Pavlu 1 modulo arithmetic All numbers here are integers. The integer division of a at n > 1 means finding the unique quotient q
More informationPrimes and Modular Arithmetic! CSCI 2824, Fall 2014!!
Primes and Modular Arithmetic! CSCI 2824, Fall 2014!!! Scheme version of the algorithm! for finding the GCD (define (gcd a b)! (if!(= b 0)!!!!a!!!!(gcd b (remainder a b))))!! gcd (812, 17) = gcd(17, 13)
More informationMath 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 information7.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 informationHomework #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 informationWednesday, February 21. Today we will begin Course Notes Chapter 5 (Number Theory).
Wednesday, February 21 Today we will begin Course Notes Chapter 5 (Number Theory). 1 Return to Chapter 5 In discussing Methods of Proof (Chapter 3, Section 2) we introduced the divisibility relation from
More informationExercises 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 informationPart 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 informationOutline. Some Review: Divisors. Common Divisors. Primes and Factors. b divides a (or b is a divisor of a) if a = mb for some m
Outline GCD and Euclid s Algorithm AIT 682: Network and Systems Security Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography Modulo Arithmetic Modular Exponentiation Discrete Logarithms
More informationOutline. AIT 682: Network and Systems Security. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms
AIT 682: Network and Systems Security Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography Instructor: Dr. Kun Sun Outline GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation
More informationNumber Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some. Notation: b Fact: for all, b, c Z:
Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some z Z Notation: b Fact: for all, b, c Z:, 1, and 0 0 = 0 b and b c = c b and c = (b + c) b and b = ±b 1
More informationA 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 informationThe Euclidean Algorithm and Multiplicative Inverses
1 The Euclidean Algorithm and Multiplicative Inverses Lecture notes for Access 2009 The Euclidean Algorithm is a set of instructions for finding the greatest common divisor of any two positive integers.
More informationMATH 145 Algebra, Solutions to Assignment 4
MATH 145 Algebra, Solutions to Assignment 4 1: a) Find the inverse of 178 in Z 365. Solution: We find s and t so that 178s + 365t = 1, and then 178 1 = s. The Euclidean Algorithm gives 365 = 178 + 9 178
More informationMATH 361: NUMBER THEORY FOURTH LECTURE
MATH 361: NUMBER THEORY FOURTH LECTURE 1. Introduction Everybody knows that three hours after 10:00, the time is 1:00. That is, everybody is familiar with modular arithmetic, the usual arithmetic of the
More informationAlgorithmic number theory. Questions/Complaints About Homework? The division algorithm. Division
Questions/Complaints About Homework? Here s the procedure for homework questions/complaints: 1. Read the solutions first. 2. Talk to the person who graded it (check initials) 3. If (1) and (2) don t work,
More informationChapter 1. Greatest common divisor. 1.1 The division theorem. In the beginning, there are the natural numbers 0, 1, 2, 3, 4,...,
Chapter 1 Greatest common divisor 1.1 The division theorem In the beginning, there are the natural numbers 0, 1, 2, 3, 4,..., which constitute the set N. Addition and multiplication are binary operations
More information7. Prime Numbers Part VI of PJE
7. Prime Numbers Part VI of PJE 7.1 Definition (p.277) A positive integer n is prime when n > 1 and the only divisors are ±1 and +n. That is D (n) = { n 1 1 n}. Otherwise n > 1 is said to be composite.
More informationMATH10040 Chapter 1: Integers and divisibility
MATH10040 Chapter 1: Integers and divisibility Recall the basic definition: 1. Divisibilty Definition 1.1. If a, b Z, we say that b divides a, or that a is a multiple of b and we write b a if there is
More informationThe Chinese Remainder Theorem
Chapter 5 The Chinese Remainder Theorem 5.1 Coprime moduli Theorem 5.1. Suppose m, n N, and gcd(m, n) = 1. Given any remainders r mod m and s mod n we can find N such that N r mod m and N s mod n. Moreover,
More informationREAL NUMBERS. Any positive integer a can be divided by another positive integer b in such a way that it leaves a remainder r that is smaller than b.
REAL NUMBERS Introduction Euclid s Division Algorithm Any positive integer a can be divided by another positive integer b in such a way that it leaves a remainder r that is smaller than b. Fundamental
More information(e) Commutativity: a b = b a. (f) Distributivity of times over plus: a (b + c) = a b + a c and (b + c) a = b a + c a.
Math 299 Midterm 2 Review Nov 4, 2013 Midterm Exam 2: Thu Nov 7, in Recitation class 5:00 6:20pm, Wells A-201. Topics 1. Methods of proof (can be combined) (a) Direct proof (b) Proof by cases (c) Proof
More informationPRIME 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 information3 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 informationWith Question/Answer Animations. Chapter 4
With Question/Answer Animations Chapter 4 Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their properties. Key ideas in number theory include divisibility
More informationDivisibility. 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 informationnot 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 informationElementary 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 informationCSC 474 Network Security. Outline. GCD and Euclid s Algorithm. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms
Computer Science CSC 474 Network Security Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography CSC 474 Dr. Peng Ning 1 Outline GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation
More informationCS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II
CS 5319 Advanced Discrete Structure Lecture 9: Introduction to Number Theory II Divisibility Outline Greatest Common Divisor Fundamental Theorem of Arithmetic Modular Arithmetic Euler Phi Function RSA
More informationThe Chinese Remainder Theorem
The Chinese Remainder Theorem R. C. Daileda February 19, 2018 1 The Chinese Remainder Theorem We begin with an example. Example 1. Consider the system of simultaneous congruences x 3 (mod 5), x 2 (mod
More information