NOTES ON SIMPLE NUMBER THEORY

Similar documents
Primes and Modular Arithmetic! CSCI 2824, Fall 2014!!

Notes on Systems of Linear Congruences

4 Powers of an Element; Cyclic Groups

Chapter 5. Number Theory. 5.1 Base b representations

5: The Integers (An introduction to Number Theory)

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635

MATH FINAL EXAM REVIEW HINTS

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

Lecture Notes. Advanced Discrete Structures COT S

Ch 4.2 Divisibility Properties

Chapter 5: The Integers

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

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology.

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

The set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, }

Integers and Division

3 The fundamentals: Algorithms, the integers, and matrices

Elementary Properties of the Integers

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

Chapter 3 Basic Number Theory

Chapter 2. Divisibility. 2.1 Common Divisors

Number 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:

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

4 Number Theory and Cryptography

Homework #2 solutions Due: June 15, 2012

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z.

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6

2. THE EUCLIDEAN ALGORITHM More ring essentials

Chapter 5. Modular arithmetic. 5.1 The modular ring

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

Ma/CS 6a Class 2: Congruences

MATH 361: NUMBER THEORY FOURTH LECTURE

1 Overview and revision

Greatest Common Divisor MATH Greatest Common Divisor. Benjamin V.C. Collins, James A. Swenson MATH 2730

Remainders. We learned how to multiply and divide in elementary

EUCLID S ALGORITHM AND THE FUNDAMENTAL THEOREM OF ARITHMETIC after N. Vasiliev and V. Gutenmacher (Kvant, 1972)

a = qb + r where 0 r < b. Proof. We first prove this result under the additional assumption that b > 0 is a natural number. Let

Part V. Chapter 19. Congruence of integers

Math 109 HW 9 Solutions

Number Theory Proof Portfolio

M381 Number Theory 2004 Page 1

CHAPTER 3. Congruences. Congruence: definitions and properties

The following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers:

Basic elements of number theory

Basic elements of number theory

3.2 Solving linear congruences. v3

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

Finitely Generated Modules over a PID, I

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

WORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:

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

MATH 215 Final. M4. For all a, b in Z, a b = b a.

Wilson s Theorem and Fermat s Little Theorem

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

(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 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby

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

Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

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

Proofs. Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm. Reading (Epp s textbook)

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

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

Number Theory Homework.

Algebra for error control codes

Finite Fields. Mike Reiter

With Question/Answer Animations. Chapter 4

Mathematics for Cryptography

NOTES ON INTEGERS. 1. Integers

Discrete valuation rings. Suppose F is a field. A discrete valuation on F is a function v : F {0} Z such that:

Ma/CS 6a Class 2: Congruences

The Euclidean Algorithm and Multiplicative Inverses

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

Proof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

Number Theory and Graph Theory. Prime numbers and congruences.

Chapter 1. Greatest common divisor. 1.1 The division theorem. In the beginning, there are the natural numbers 0, 1, 2, 3, 4,...,

Elementary Number Theory. Franz Luef

Wednesday, February 21. Today we will begin Course Notes Chapter 5 (Number Theory).

An Algorithm for Prime Factorization

Signature: (In Ink) UNIVERSITY OF MANITOBA TEST 1 SOLUTIONS COURSE: MATH 2170 DATE & TIME: February 11, 2019, 16:30 17:15

1. Factorization Divisibility in Z.

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

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

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.

Lecture 4: Number theory

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

Divisibility. Def: a divides b (denoted a b) if there exists an integer x such that b = ax. If a divides b we say that a is a divisor of b.

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

Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm

CMPUT 403: Number Theory

Homework 3, solutions

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

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

Notes for Recitation 6

Introduction to Sets and Logic (MATH 1190)

This exam contains 5 pages (including this cover page) and 4 questions. The total number of points is 100. Grade Table

The Fundamental Theorem of Arithmetic

Transcription:

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, i.e., when m = dq and m, q Z and d N, we say d is a divisor of m or a factor of m and m is a multiple of d. We also say that m is divisible by d. The statement d divides m is written symbolically as d m. Theorem: If d divides a and a divides b, then d divides b. Definition: For integers a, b, and n, we say that n is a linear combination of a and b iff there are integers x and y such that n = ax + by. Theorem: If d divides a and d divides b, then d divides any linear combination of a and b. Definition: We say a number is prime iff it is an integer greater than 1 and its only positive integer divisors are 1 and itself. We say a number is composite iff it is an integer greater than 1 that has a positive integer divisor other than 1 and itself. Theorem: There are infinitely many primes. Theorem: (Division Algorithm) For any integer n and any nonzero integer d, there are unique integers q and r, that satisfy n = dq + r and 0 r < d. Definition: In the division algorithm we refer to n as the dividend, d as the divisor, q as the quotient, and r as the remainder. Comment: Notice that d being a divisor of n means that when the division algorithm is applied with d as the divisor and n as the dividend, the remainder r is zero. Thus, divisor is used in two ways. Likewise, we might say, when n is divided by d, we get a remainder r, whether r = 0 or r > 0. This double use of language should not be a problem because whenever a statement claims simply that x is a divisor of y, we understand that y = xk for some k Z. Proposition: If d divides n and d = 1, then d does not divide (n + 1). 1

NOTES ON SIMPLE NUMBER THEORY 2 Definition: We say a is congruent to b modulo d iff d (a b). Symbolically, we write a b (mod d) or a d b Theorem: For any a, b Z, and for any d N, a and b have the same remainder when divided by d if and only if a d b. Definition: Let a and b be integers that are not both 0. An integer c is a common divisor of a and b if c a and c b. The greatest common divisor of a and b is the greatest integer that is a divisor of a and b. Definition: We say integers a and b are relatively prime iff gcd(a, b) = 1. Theorem: Let a and b be integers that are not both 0. Then gcd(a, b) is the least positive integer that is a linear combination of a and b. Corollary: Two integers a and b are relatively prime if and only if 1 can be written as a linear combination of a and b. Corollary: Let a and b be integers that are not both 0. Then d = gcd(a, b) if and only if d is a common divisor of a and b such that for any other common divisor of a and b, say c, we have c d. Theorem: Let a and b be positive integers. If b = aq + r and q, r Z, then gcd(a, b) = gcd(r, a). Theorem: (Euclidean Algorithm) Let a and b be positive integers such that a < b and b = aq + r as in the division algorithm. Then it is possible to repeat the division algorithm with r as the divisor and a as the dividend. In fact, the algorithm can be performed repeatedly in this manner until some remainder divides some dividend with a remainder of zero. The least positive remainder observed in this algorithm is gcd(a, b). Theorem: Let d, a, and b be integers such that d ab. Then, if gcd(d, a) = 1, then d b. Lemma: (Euclid) Let a and b be integers and let p be a prime. Then, if p ab, then p a or p b. Theorem: Let n 2 be an integer and let a 1, a 2,..., a n be integers and let p be a prime. Then, if p divides the product a 1 a 2 a n, then p a i for some i, 1 i n. Theorem: (Fundamental Theorem of Arithmetic) For each integer n 2 there exists a unique set of prime factors {p 1, p 2,..., p k } and unique exponents m 1, m 2,..., m k satisfying n = p m 1 1 pm 2 2 p m k k.

NOTES ON SIMPLE NUMBER THEORY 3 Examples Example: Let a = 18 and b = 30 and c = 90. We can write each integer as a product of primes in increasing order: 18 = (2)(3)(3), 30 = (2)(3)(5), and 90 = (2)(3)(3)(5). The fundamental theorem of arithmetic assures us that this can always be accomplished. Let D n be the set of positive divisor of n. Then we have D 18 = {1, 2, 3, 9, 18}, D 30 = {1, 2, 3, 5, 6, 10, 15, 30}, and D 90 = {1, 2, 3, 5, 6, 9, 10, 15, 18, 30, 45, 90}. Simply through observation, we see that gcd(18, 30) = 3, gcd(18, 90) = 18, and gcd(30, 90) = 30. The Euclidean algorithm ensures that we can always find the greatest common divisor, even without knowing the factorization that the FTA says does exist. Example: Use the Euclidean Algorithm to find gcd(220, 143) and then to find x and y so that gcd(220, 143) = 220x + 143y. 11 = 220(2) + 143( 3) Example: Use the Euclidean Algorithm to show that 110 and 273 are relatively prime and then to write 1 as a linear combination of 110 and 273. 1 = 110( 67) + 273(27) (= 7370 + 7371) Proofs Theorem: Let a and b be integers that are not both 0. Then gcd(a, b) is the least positive integer that is a linear combination of a and b. Proof: Let D be the set of common divisors of a and b and let L be the set of all linear combinations of a and b that are positive. Recall that if an integer divides both a and b, then it divides any linear combinations of a and b. To reiterate, any common divisor of a and b divides every linear combination of a and b. Thus, if we could find integers u, v D L such that u = v, the we would have u D and v L, from which we see that u v, which implies that u v. But, we also would have v D and u L, so v u and v u. But then u = v, which contradicts our assumption that there were two distinct elements in D L. Thus, D L has 0 or 1 elements. Notice also that if there is an element d D L, since for any c D, we would have c d, we would know that d = gcd(a, b). By the Well-Ordering Principle, there is a least element of L. Let d be the least element of L. We show that d D, from which we will conclude that d = gcd(a, b). Let x and y be integers for which

NOTES ON SIMPLE NUMBER THEORY 4 d = ax + by. Now, using the division algorithm with a and d we have q and r such that a = dq + r, where 0 r < d. Thus r = a dq = a (ax + by)q = a(1 xq) + b( yq) Since r < d and d was the least element in L, we know r / L. It follows that r = 0 and so d a. A similar argument will verify that d b, which means d D. This completes the proof. Comment: The proof above proves the following corollary. Corollary: Let a and b be integers that are not both 0. Then d = gcd(a, b) if and only if d is a common divisor of a and b such that for any other common divisor of a and b, say c, we have c d. Theorem: Let a and b be positive integers. If b = aq + r for some integers q and r, then gcd(a, b) = gcd(r, a). Proof: Let d = gcd(a, b) and e = gcd(r, a). We will show that d = e. Notice that we have b written as a linear combination of a and r, so e divides the linear combination, which is b. Since e is assumed to divide a, this means e is a divisor of a and b, so e d. Also, since r = b aq, we can write r as a linear combination of b and a and we see that d divides the linear combination, which is r. Since d is assumed to divide a, we have d a divisor of both r and a, so d e. It follows that d = e. Theorem: Let d, a, and b be integers such that d ab. Then, if gcd(d, a) = 1, then d b. Proof: Since d ab, we can find an integer j s.t. ab = dj. Since gcd(d, a) = 1, we can find integers x and y s.t. 1 = dx + ay. Multiplying this last equation by b we get b = dbx + aby. Then substitution for ab gives us b = dbx + djy = d(bx + jy), so d b. Lemma: (Euclid s Lemma) Let a and b be integers and let p be a prime. Then, if p ab, then p a or p b. Proof: If p a, then there is nothing to prove, so we suppose that p does not divide a. Since the only positive divisor of p are 1 and p, we have gcd(a, b) = 1. But then the last theorem implies that p b. Theorem: Let n 2 be an integer and let a 1, a 2,..., a n be integers and let p be a prime. Then, if p divides the product a 1 a 2 a n, then p a i for some i, 1 i n. Proof: We use the PMI. The base case, n = 2 is Euclid s Lemma. For the inductive step, we suppose that p divides the product a 1 a 2 a k a k+1 and we let a = a 1 a 2 a k. Thus we have p aa k+1 and by Euclid s Lemma, p a or p a k+1. If p divides a k+1, then there is nothing to prove, so we assume p a, i.e., p a 1 a 2 a k. By assuming

NOTES ON SIMPLE NUMBER THEORY 5 the inductive hypothesis, we conclude that p divides at least one of a 1, a 2,..., a k. Since this proves the inductive step, the PMI implies the theorem. Theorem: (Fundamental Theorem of Arithmetic) Every integer n 2 can be expressed as a product of primes. That is, n = p 1 p 2 p k where p i is a prime for each i, 1 i k. Moreover, the factorization is unique excepting the order in which the primes are written. Notice that the p i need not be distinct and that n is prime if and only if there is only one prime factor of n. Proof: We use the SPMI on n. The base case is n = 2, for which n is already written as a product of primes. For the inductive step, n is prime then n is already written as a product of primes. Thus, we can assume that n is not prime. This means that n is composite and there exist positive integers a, b s.t. n = ab. Applying the inductive hypothesis to a and to b, we can assume that each of a and b is a product of primes, which means that their product ab = n is a product of primes. All that remains is to show that this factorization is unique except for the order in which the factors are written. Suppose to the contrary that the factorization were not unique. Then we would be able to write n = p 1 p 2 p k and n = q 1 q 2 q l where p i is prime for 1 i k and q i is prime for 1 i l and p i p i+1 for 1 i k 1 and q i q i+1 for 1 i i 1; and by the Well- Ordering Principle, there is a least index i for which p i = q i. We let m denote this index. Thus, p i = q i for 1 i < m and p m = q m. Also, we have n = p 1 p 2... p m 1 p m... p k = q 1 q 2... q m 1 q m... q l. Dividing both sides by p 1 p 2... p m 1, we arrive at p m... p k = q m... q l. But then we observe that p m divides the product q m... q l, which implies that p m divides at least one of the q i where m i l. We denote this prime by q j and conclude that since p m q j, we know p m q j. But we also know that q m q j by the ordering assumption. Thus p m q m. A symmetric argument leads to the conclusion that q m p m. But then we must conclude that p m = q m, which contradicts m being the least index for which p i = q i. The only possibility that remains is that there is no least positive index for which p i = q i, which means that p i = q i. Since this argument can be applied to the p i or the q i, we must also conclude that k = l and that the factorization is unique.