Number Theory and Graph Theory. Prime numbers and congruences.

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

PRACTICE PROBLEMS: SET 1

Number Theory and Graph Theory. Arithmetic functions and roots of unity

Number Theory and Graph Theory

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

Number Theory and Graph Theory

Chapter V. Theory of the Integers. Mathematics is the queen of the sciences and number theory is the queen of mathematics. Carl Friedrich Gauss

Chapter 5. Number Theory. 5.1 Base b representations

Homework 3, solutions

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

32 Divisibility Theory in Integral Domains

Chapter 5: The Integers

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

NOTES ON SIMPLE NUMBER THEORY

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

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

MATH FINAL EXAM REVIEW HINTS

4 Powers of an Element; Cyclic Groups

Carmen s Core Concepts (Math 135)

Beautiful Mathematics

Mathematics for Computer Science Exercises for Week 10

5: The Integers (An introduction to Number Theory)

CISC-102 Fall 2017 Week 6

Solution Set 2. Problem 1. [a] + [b] = [a + b] = [b + a] = [b] + [a] ([a] + [b]) + [c] = [a + b] + [c] = [a + b + c] = [a] + [b + c] = [a] + ([b + c])

NOTES ON INTEGERS. 1. Integers

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

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

MATH 2200 Final Review

CISC-102 Winter 2016 Lecture 11 Greatest Common Divisor

On the Dynamic Chromatic Number of Graphs

Solutions to Assignment 1

Mathematics 228(Q1), Assignment 2 Solutions

PRIME NUMBERS YANKI LEKILI

Complete Induction and the Well- Ordering Principle

M381 Number Theory 2004 Page 1

8 Primes and Modular Arithmetic

We want to show P (n) is true for all integers

MTH 310, Section 001 Abstract Algebra I and Number Theory. Sample Midterm 1

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

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

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

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

2 Elementary number theory

0 Sets and Induction. Sets

Prime and irreducible elements of the ring of integers modulo n

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

MATHEMATICS X l Let x = p q be a rational number, such l If p, q, r are any three positive integers, then, l that the prime factorisation of q is of t

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

Number Theory Math 420 Silverman Exam #1 February 27, 2018

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

REAL 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.

MATH10040: Numbers and Functions Homework 1: Solutions

Math 109 September 1, 2016

MATH 361: NUMBER THEORY FOURTH LECTURE

Instructor: Bobby Kleinberg Lecture Notes, 25 April The Miller-Rabin Randomized Primality Test

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

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

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

Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm

Computer Science Foundation Exam

CHAPTER 3. Number Theory

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

Writing Assignment 2 Student Sample Questions

MAT246H1S - Concepts In Abstract Mathematics. Solutions to Term Test 1 - February 1, 2018

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

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:

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

Remainders. We learned how to multiply and divide in elementary

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

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

God may not play dice with the universe, but something strange is going on with the prime numbers.

Lecture Notes on Discrete Mathematics. A K Lal S Pati DRAFT

CS280, Spring 2004: Prelim Solutions

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

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

Elementary Properties of the Integers

Wilson s Theorem and Fermat s Little Theorem

UNIVERSITY OF VICTORIA DECEMBER EXAMINATIONS MATH 122: Logic and Foundations

Homework #2 solutions Due: June 15, 2012

MATH10040: Chapter 0 Mathematics, Logic and Reasoning

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

Ch 4.2 Divisibility Properties

LEGENDRE S THEOREM, LEGRANGE S DESCENT

PGSS Discrete Math Solutions to Problem Set #4. Note: signifies the end of a problem, and signifies the end of a proof.

Chapter 7. Number Theory. 7.1 Prime Numbers

FACTORIZATION AND THE PRIMES

Solutions to odd-numbered exercises Peter J. Cameron, Introduction to Algebra, Chapter 3

Chapter 8. P-adic numbers. 8.1 Absolute values

Sums of Squares. Bianca Homberg and Minna Liu

. As the binomial coefficients are integers we have that. 2 n(n 1).

2. THE EUCLIDEAN ALGORITHM More ring essentials

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

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Course: CS1050c (Fall '03) Homework2 Solutions Instructor: Prasad Tetali TAs: Kim, Woo Young: Deeparnab Chakrabarty:

4. Number Theory (Part 2)

Mathematical Reasoning & Proofs

Prime Rational Functions and Integral Polynomials. Jesse Larone, Bachelor of Science. Mathematics and Statistics

Homework 1 (revised) Solutions

Chapter 2. Divisibility. 2.1 Common Divisors

2. Prime and Maximal Ideals

Transcription:

1 Number Theory and Graph Theory Chapter 2 Prime numbers and congruences. By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com

2 Module-1:Primes and their Properties Objectives Prime numbers and composite numbers and their properties. Fundamental Theorem of Arithmetic. Definition 1. An integer p is said to be a prime if p 2 and the only positive divisors of p are 1 and p. An integer n is said to be composite if n 2 and n is not a prime. Remark 2. The number 1 is neither prime nor composite. Lemma 3. An integer n 2 is composite if and only if there are integers a and b such that n = ab, 1 < a < n, and 1 < b < n. Proof. Let n 2. If n is composite there is a positive integer a such that a 1, a n and a n. This means that n = ab for some b. Since n and a are positive so is b. By definition 1 < a < n and 1 b n. If b = 1 then a = n, which is not possible, so b 1. If b = n then a = 1, which is also not possible. So 1 < b < n. The converse is obvious. Lemma 4. If n 2, then there is a prime p such that p n. Proof. We prove the result by induction on n. The result holds for n = 2. So, let the result be true for all positive integer n < k. Now, let n = k. If k is itself a prime, then we are done. Else, k is composite and hence there exist a,b N such that 1 < a,b < k and k = ab. Now, apply the induction hypothesis on a or b to get the required result.

3 Theorem 5. If n 2 is composite then n has a prime divisor p n. Proof. Let n 2 be composite. Then n = ab where 1 < a < n and 1 < b < n. We claim that one of a or b is n. If not, then a > n and b > n implies that n = ab > n n = n, a contradiction. So a n or b n. Suppose a n. Since a 2, there is a prime p such that p a and hence p n. Hence, p a n. Remark 6. Theorem 5 is helpful in deciding whether an integer is prime or not: To check whether or not n 2 is prime, we only need to divide n by all primes p n. If none of these primes divides n then n must be prime. Example 7. Consider the number 89. Note that 89 < 100 = 10. The primes 10 are 2, 3, 5, and 7. One can easily check that none of the primes 2, 3, 5, 7 divides 89. Hence, 89 is prime by Theorem 5. 1. Begin (* algorithm *) Input: n 2 2. list all primes n. 3. If any of them is a factor of n, then n is not a prime. 4. else n is a prime 5. End (* algorithm *) Lemma 8 (Euclid s Lemma). Let gcd(a,b) = 1 and a bc. Then a c. Proof. Since gcd(a,b) = 1, there exists x,y Z such that 1 = ax + by. Thus, c = acx + bcy. Also, a bc bc = az for some z Z. Hence, c = acx + bcy = a(cx + zy). Thus, a c.

4 Corollary 9. Let p be a prime and p ab. Then p a or p b. Proof. If p a then we are through. If p a then gcd(p,a) = 1, hence from Lemma 8 we have p b. Note that the above result is not true when p is not prime. For example, 6 2 3, but 6 2 and 6 3. Corollary 10. Let p be a prime with p a 1 a 2...a n. Then, p a i for some i, where 1 i n. Proof. We proceed by induction on n, the number of factors. When n = 1 the statement is clearly true. We suppose the statement is true for all k < n. Let p a 1 a 2...a n. Then from Corollary 9 p a 1 or p a 2 a 3 a n. If p a 1, then by induction hypothesis p a i for some i, 2 i n. Hence, the result follows from PCI. Corollary 11. If p is a prime number and p a, then p n a n. Lemma 12. Let a,b,c be integers. Then gcd(a,bc) = 1 if and only if gcd(a,b) = 1 and gcd(a,c) = 1. Proof. Suppose that gcd(a,bc) = 1. We have to show that gcd(a,b) = 1 and gcd(a,c) = 1. If gcd(a,b) = d then, d a,d b. Thus, d bc and d gcd(a,bc) = 1 and hence d = 1. Similarly, we can prove that gcd(a,c) = 1. Conversely, suppose that gcd(a,b) = 1 and gcd(a,c) = 1. Now, assume that gcd(a,bc) = d > 1. Consequently, d has a prime divisor say p. So p a and p bc hence, p a and p b or p c. Thus, either p gcd(a, b) or p gcd(a, c), a contradiction as gcd(a, b) = 1 and gcd(a, c) = 1. Theorem 13 (Fundamental theorem of Arithmetic). Every positive integer n > 1 can be expressed as a product of primes; this representation is unique, apart from the order in which the factors occur.

5 Proof. If n itself is prime, then nothing to prove. If n is composite, then the set S n = {d Z + d is a divisor of n,1 < d < n} is a non-empty subset of positive integers. By Well Ordering principle S n contains a least element say p 1 and which is necessarily prime. Now we write n = n 1 p 1, where p 1 is the smallest prime dividing n and 1 < n 1 < n. If n 1 is prime, we have our required representation. Otherwise we can find p 2, the smallest element in S n1. Again p 2 is prime and n = p 1 p 2 n 2. If n 2 is not prime we proceed as above. One can easily notice that S n1 is a proper subset of S n. Thus, the decreasing sequence n > n 1 > n 2 > > 1 (or equivalently, /0 S n2 S n1 S n ) cannot continue indefinitely. So, after a finite number of steps n k 1 becomes a prime say p k. Hence n = p 1 p 2 p k. Uniqueness: Let n = p 1 p 2 p r = q 1 q 2 q s, and r s, where p i,q j are primes written in increasing order that is p 1 p 2 p 3 p r and q 1 q 2 q s. Since p 1 q 1 q 2 q s, so p 1 q k or p 1 = q k for some k {1,2,...,s} as both p 1 and q k are primes. Then p 1 = q k q 1. A similar argument implies that q 1 p 1. Thus, we have p 1 = q 1. Consequently, we have p 2 p r = q 2 q s By continuing the above process, we get p 2 = q 2 implying p 3 p r = q 3 q s. By repeating this process, we have r = s and p 1 = q 1, p 2 = q 2,..., p r = q r. On the contrary, if we assume that r < s then we eventually arrive at 1 = q r+1 q r+2 q s, an absurd equality as each q j > 1. Hence r = s and p 1 = q 1, p 2 = q 2... p r = q r.

6 Theorem 14. If n = p k 1 1 pk r r is the prime factorization of n > 1 into distinct primes then, the positive divisors of n are precisely those integers d of the form d = p a 1 1 pa r r, where 0 a i k i (i = 1,2,...,r). Proof. Observe that d = 1 is obtained when a i = 0 for i = 1,2,...,r and d = n is obtained when a i = k i for i = 1,2,...,r. Let d be a non-trivial divisor on n such that dd 1 = n where n > d and d 1 > 1. Let d = t 1 t 2...t a and d 1 = s 1 s 2...s b be the prime factorization of d and d 1, respectively such that all t i s and s j s need not be distinct. Then, p k 1 1 pk 2 2 pk r r = t 1 t 2...t a s 1 s 2...s b are two factorizations of the positive integer n. By the uniqueness of the prime factorization, each prime t i must be one of the p j s. Collecting equal primes into a single integral power, we get where the possibility of a i = 0 is allowed. d = t 1 t 2...t a = p a 1 1 pa 2 2 pa r r, Conversely, every number d = p a 1 1 pa 2 2 pa r r where 0 a i k i for i = 1,2,...,r turns out to be divisor of n. Theorem 15. If n( 2) Z. Then, n can be written in the form n = ab 2, where a,b Z and a is square-free. Proof. Let n = p k 1 1 pk 2 2 pk r r be the prime factorization of n 2 into distinct primes. For 1 i r, one can write k i as 2q i + r i where each r i is either 0 or 1 depending on k i is even or odd. Set a = p r 1 1 pr 2 2 pr r r and b = p q 1 1 pq 2 2 pq r r. Then, we get the required representation for n. Few applications of Division Algorithm Problem 16. 1. The only prime of the form n 3 1 is 7. 2. The only prime of the form n 2 4 is 5.

7 3. Let p be a prime with p 5, then p 2 + 2 is not a prime. [Hint: Note p is of the form 6k + 1 or 6k + 5.] 4. Every integer of the form n 4 + 4, with n > 1, is composite. 5. If n > 4 is composite, then n divides (n 1)!. 6. Each integer n > 11 can be written as sum of two composite numbers. Hint: If n is even, say n = 2k, then n 6 = 2(k 3); For n is odd, consider the integer n 9. 7. If p q 5 and p and q are both prime, prove that 24 p 2 q 2. 8. If p 5 is an odd prime, prove that either p 2 1 or p 2 + 1 is divisible 10.