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.