* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Distribution of Prime Numbers 6CCM320A / CM320X
Survey
Document related concepts
Mathematical proof wikipedia , lookup
Wiles's proof of Fermat's Last Theorem wikipedia , lookup
Georg Cantor's first set theory article wikipedia , lookup
Factorization of polynomials over finite fields wikipedia , lookup
Quadratic reciprocity wikipedia , lookup
Non-standard calculus wikipedia , lookup
List of important publications in mathematics wikipedia , lookup
Fermat's Last Theorem wikipedia , lookup
Fundamental theorem of calculus wikipedia , lookup
List of prime numbers wikipedia , lookup
Elementary mathematics wikipedia , lookup
Transcript
Distribution of Prime Numbers 6CCM320A / CM320X Manuel Breuning Department of Mathematics King’s College London January 2010 Contents Chapter 1. Divisibility 1. Basic notations and definitions 2. Euclid’s algorithm 3. The fundamental theorem of arithmetic 4. Computational problems 5. Addendum: Proofs of results in §2 and §3 3 3 4 5 7 8 Chapter 2. Basic distribution results 1. Elementary observations 2. The function π 3. Chebyshev’s theorem 4. Bertrand’s postulate 5. Addendum: Proof of Bertrand’s postulate 11 11 12 14 15 16 Chapter 3. The prime number theorem 1. Statement of the prime number theorem 2. Addendum: Error terms and Riemann hypothesis 19 19 21 Chapter 4. Arithmetic functions and Dirichlet series 1. The Riemann zeta function 2. Arithmetic functions 3. Dirichlet series 4. Addendum: The Möbius function 23 23 26 27 29 Chapter 5. Primes and arithmetic progressions 1. Primes in arithmetic progressions 2. Addendum: Arithmetic progressions in the sequence of primes 31 31 32 Appendices Notation Further reading The first 400 prime numbers 35 35 36 37 1 CHAPTER 1 Divisibility In this chapter we discuss divisibility of integers. The most important result is the fundamental theorem of arithmetic: every integer greater than 1 can be expressed as a product of prime numbers and apart from the order of the factors this product representation is unique. We also look at some computational problems related to prime numbers. 1. Basic notations and definitions In this course we are mainly interested in properties of positive integers (also called natural numbers). We write N for the set of all positive integers, so N = {1, 2, 3, . . . }. We will use many well-known properties of N without further explanation, for example we will use that N is ordered (i.e. we know what a ≤ b means for a, b ∈ N) and that certain algebraic operations (addition, multiplication) are defined for positive integers. Furthermore we will prove some statements by induction, so we assume familiarity with the principle of induction. To study properties of N we must sometimes consider larger sets, in particular the set of all non-negative integers N ∪ {0} = {0, 1, 2, 3, . . . } and the set of all integers Z = {. . . , −2, −1, 0, 1, 2, . . . }. Later we will also require the real numbers R and the complex numbers C. Definition 1.1. Let a, b ∈ Z. We say that b divides a (or equivalently that b is a divisor of a, or that b is a factor of a, or that a is divisible by b, or that a is a multiple of b) if there exists an integer q ∈ Z such that a = bq. We write b | a if b divides a, and b - a if b doesn’t divide a. Most of the time we will be interested in positive divisors of positive integers. Example 1.2. (1) 3 | 12 because 12 = 3 · 4. Also −3 | 12 because 12 = (−3) · (−4). But 3 - 10 because 10 6= 3 · q for all q ∈ Z. (2) Let n be any integer. Then 1 | n and n | n. (3) The number 1 has only one positive divisor, namely 1 itself. (4) If a and b are positive integers and if b | a then b ≤ a. Indeed, b | a implies that there exists q ∈ Z with a = bq, and since a and b are positive so is q. Therefore q ≥ 1 and it follows that b ≤ bq = a. (5) If b | a1 and b | a2 then b | a1 + a2 . Definition 1.3. A positive integer n is called a prime number (or simply a prime) if n 6= 1 and if the only positive divisors of n are 1 and n. A positive integer n is called composite if n has a positive divisor different from 1 and n. 3 4 1. DIVISIBILITY The number 1 is neither prime nor composite. Every positive integer n other than 1 is either prime or composite (but not both). Example 1.4. (1) The first 10 prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29. (2) The first 10 composite numbers are 4, 6, 8, 9, 10, 12, 14, 15, 16, 18. 2. Euclid’s algorithm Lemma 1.5 (Division algorithm). Given a ∈ Z and b ∈ N, there exist unique q, r ∈ Z such that a = qb + r and 0 ≤ r < b. The proof of Lemma 1.5 is in Chapter 1, §5 (this proof is not examinable). If a = qb + r and 0 ≤ r < b as in Lemma 1.5, then r is called the remainder of a when divided by b. Definition 1.6. Let a, b ∈ N. The greatest common divisor of a and b is the greatest number d ∈ N with the property that d | a and d | b. We write (a, b) for the greatest common divisor of a and b. The numbers a and b are said to be coprime (or relatively prime) if (a, b) = 1. We remark that any two natural numbers a, b have a greatest common divisor. Indeed, the set {d ∈ N : d | a and d | b} is non-empty (because it contains 1) and bounded above (a is an upper bound) and therefore contains a greatest element. Example 1.7. We want to find the greatest common divisor of 8 and 12. The set of positive divisors of 8 is {1, 2, 4, 8} and the set of positive divisors of 12 is {1, 2, 3, 4, 6, 12}. Therefore the set of positive common divisors is {1, 2, 4} and thus 4 is the greatest common divisor of 8 and 12. We can compute the greatest common divisor of a, b ∈ N using Euclid’s algorithm. This works as follows. We apply the division algorithm to a and b to get a = q1 b + r1 with 0 ≤ r1 < b. If r1 6= 0 then we apply the division algorithm to b and r1 and get b = q2 r1 + r2 with 0 ≤ r2 < r1 . If r2 6= 0 then we apply the division algorithm to r1 and r2 and get r1 = q3 r2 + r3 with 0 ≤ r3 < r2 . We repeat this until we find a remainder which is zero (this must happen at some point because b > r1 > r2 > · · · ≥ 0). Then we have a system of equations a = q1 b + r1 , b = q2 r1 + r2 , r1 = q3 r2 + r3 , .. . rn−3 = qn−1 rn−2 + rn−1 , rn−2 = qn rn−1 + rn , rn−1 = qn+1 rn + 0. 0 < r1 < b 0 < r2 < r1 0 < r3 < r2 0 < rn−1 < rn−2 0 < rn < rn−1 To show that this algorithm really computes the greatest common divisor of a and b we need the following lemma. Lemma 1.8. If a = qb + r then (a, b) = (b, r). Proof. If d is a common divisor of a and b, then d | a − qb = r which shows that d is also a common divisor of b and r. Conversely, if d is a common divisor of b and r, then d | qb + r = a which shows that d is also a common divisor of a and b. 3. THE FUNDAMENTAL THEOREM OF ARITHMETIC 5 Therefore the set of common divisors of a and b is equal to the set of common divisors of b and r, and thus the greatest common divisors are equal. We apply this lemma repeatedly to the equations in Euclid’s algorithm and obtain (a, b) = (b, r1 ) = (r1 , r2 ) = (r2 , r3 ) = · · · = (rn−2 , rn−1 ) = (rn−1 , rn ). But the equation rn−1 = qn+1 rn + 0 shows that rn | rn−1 and therefore (rn−1 , rn ) = rn . We have shown the following result. Theorem 1.9. The last non-zero remainder rn in Euclid’s algorithm is the greatest common divisor of a and b. Example 1.10. We want to compute the greatest common divisor of 99 and 42. Euclid’s algorithm gives 99 = 2 · 42 + 15, 42 = 2 · 15 + 12, 15 = 1 · 12 + 3, 12 = 4 · 3 + 0. The last non-zero remainder is 3, thus (99, 42) = 3. 3. The fundamental theorem of arithmetic Note: The proofs of Lemmas 1.11, 1.12, 1.16 and of Theorem 1.13 are in Chapter 1, §5 (these four proofs are not examinable). Lemma 1.11. Let p be a prime number and let a1 , a2 ∈ N. If p | a1 a2 then p | a1 or p | a2 . More generally, if a prime number p divides a product a1 a2 · · · an then p divides ai for some i. By a prime factor (or prime divisor ) of a positive integer a we mean a prime number p which is a factor of a. Lemma 1.12. Every integer a > 1 has a prime factor. Theorem 1.13 (Fundamental theorem of arithmetic). Every integer a > 1 is a product of prime numbers, i.e. a = p1 p2 · · · pn where n ≥ 1 and the pi are prime numbers (not necessarily distinct). Apart from the order of the factors this product representation is unique. It is often convenient to write the prime factorisation of a number a > 1 in the form a = pk11 · · · pkr r where r ≥ 1, the pi are distinct prime numbers and the exponents ki are positive integers. One often allows ki = 0; since p0i = 1, a prime number pi with exponent ki = 0 is not a prime factor of a. One advantage of allowing the exponent 0 is that then a = 1 can be written in the same form: 1 = p01 · · · p0r . Example 1.14. 200 = 2 · 5 · 2 · 5 · 2 = 23 · 52 = 23 · 30 · 52 . If we know the prime factorisation of a positive integer a then we can immediately write down all positive divisors of a: if a = pk11 · · · pkr r then b | a if and only if b = pl11 · · · plrr with 0 ≤ li ≤ ki for all i. We apply this observation to prove the following lemma (which is needed in Chapter 4, §2). Lemma 1.15. If m, n ∈ N are coprime then every d | mn can be written uniquely as d = d1 d2 where d1 | m and d2 | n (we assume that d, d1 , d2 are all positive). 6 1. DIVISIBILITY Proof. Since m and n are coprime, they don’t have any prime factors in kr+s kr+1 where all the pi are distinct. If · · · pr+s common. So m = pk11 · · · pkr r and n = pr+1 lr+s l1 d | mn then d = p1 · · · pr+s with 0 ≤ li ≤ ki for 1 ≤ i ≤ r + s. Let d1 = pl11 · · · plrr lr+s lr+1 . Then obviously d = d1 d2 , d1 | m and d2 | n. · · · pr+s and d2 = pr+1 l0 l0 Conversely if d = d01 d02 , d01 | m and d02 | n then we must have d01 = p11 · · · prr l0 l0 r+1 r+s and d02 = pr+1 · · · pr+s . From d = d01 d02 it follows that li = li0 for 1 ≤ i ≤ r + s and 0 therefore d1 = d1 and d2 = d02 . This shows uniqueness. The following result is used in Chapter 2, §3. Lemma 1.16. Let p1 , p2 , . . . , pr be distinct prime numbers and let n be any integer. If pi | n for all i then p1 p2 · · · pr | n. Finally we want to give an explicit formula for the prime factorisation of N !. QN Recall that for N ∈ N one defines N ! (read: N factorial) by N ! = i=1 i = 1 · 2 · · · (N − 1) · N . Thus 1! = 1, 2! = 2, 3! = 6, 4! = 24, etc. First note that if p is a prime factor of N ! then p must divide one of the numbers 1, 2, . . . , N (by Lemma 1.11) and therefore p ≤ N . On the other hand every prime number p ≤ N is obviously a prime factor of N !. To simplify the notation we will use the convention that an index P p in a sum or product denotes a prime number. For example in the expression p p1 (considered in Corollary 4.7) the sum is over all prime numbers p, and in the expression Q kp (in Lemma 1.17) the product is over all prime numbers p not greater p≤N p than N . Q P∞ h i Lemma 1.17. N ! = p≤N pkp where kp = m=1 pNm . Here we have used the following standard notation: for any x ∈ R, [x] is the greatest integer that is less than or equal to x, e.g. [2.6] = 2, [5] = 5, [−1.5] = −2. P∞ h N i Note that the sum m=1 pm has only finitely many non-zero summands because h i if pm > N then pNm = 0. Proof of Lemma 1.17. Consider a prime number p ≤ Nh. We i must count N how often p appears in the product N ! = 1 · 2 · · · · · N . Clearly p of the factors h i 1, 2, . . . , N are multiples of p; pN2 of these factors are multiples of p2 ; etc. Hence h i h i in kp = Np + pN2 + . . . we have counted once the number of factors which are divisible by p but not by p2 , we have counted twice the number of factors which are divisible by p2 but not by p3 , etc. This shows that the prime factor p appears kp times in N !. Example 1.18. We want to compute the largest integer k such that 7k | 50!. By Lemma 1.17 ∞ X 50 50 50 k= = 1 + 2 = 7 + 1 = 8. m 7 7 7 m=1 Note that only the summands for 50m = 1 and m = 2 are non-zero because for m ≥ 3 = 0. one has 750 m < 1 and therefore m 7 4. COMPUTATIONAL PROBLEMS 7 Using Lemma 1.17 one can easily deduce formulas for the prime factorisation n! of other expressions formed with factorials, e.g. binomial coefficients nk = k!(n−k)! . This is used in Chapter 2, §5. 4. Computational problems Lemma 1.19. A positive integer n is composite if and only if n has a prime √ divisor p satisfying p ≤ n. Proof. If n is composite then n = ab with 1 < a < n and 1 < b < n. We can assume that a ≤ b. By Lemma 1.12 a prime factor p. Then p is also a prime √ a has √ √ factor of n and p ≤ a = a · a ≤ a · b = n. √ Conversely suppose that n has a prime divisor p ≤ n. Then n 6= 1 (because √ 1 doesn’t have a prime divisor) and therefore n < n. Hence 1 < p < n and p | n, i.e. n is composite. An algorithm that determines whether an integer n > 1 is prime or composite is called a primality test. The easiest primality test is √ the following method which is known as trial division. For every prime number p ≤ n test whether√n is divisible by p or not. By Lemma 1.19 we know that if p | n for some p ≤ n then n is composite, otherwise n is prime. Trial division is only useful to test primality of small numbers. Remark 1.20. In 2002, Agrawal, Kayal and Saxena developed the first polynomial time primality test (now known as the AKS primality test). Polynomial time means that there exist constants C, k such that for every integer n > 1 the algorithm needs at most C · (log n)k many steps to decide whether n is prime or composite. If n is composite then the AKS primality test will confirm this without finding a factor of n, so this primality test can’t be used to find prime factorisations. The sieve of Eratosthenes is a method to compute a list of all prime numbers not greater than n (where n ≥ 2 is given). We explain it for the example n = 50. Write down all integers from 2 to 50. We will cross out more and more composite numbers from this list until in the end only the prime numbers remain. We cross out all multiples of 2 except 2 itself, i.e. 4, 6, 8, . . . , 50. The first remaining integer after 2 is 3. We cross out all multiples of 3 except 3 itself, i.e. 6, 9, 12, . . . , 48 (note that some of these numbers were already crossed out because they are multiples of 2). The first remaining integer after 3 is 5. We cross out all multiples of 5 except 5 itself, i.e. 10, 15, 20, . . . , 50 (again some of these numbers have been crossed out earlier). The first remaining integer after 5 is 7. We cross out all multiples of 7 except 7 itself, i.e. 14, 21, . . . , 49 (some of these numbers have been crossed out earlier). Now the list looks as follows. 11 21 31 41 2 1 2 2 2 3 2 4 2 3 13 23 3 3 43 4 14 24 34 44 5 1 5 2 5 3 5 4 5 6 1 6 2 6 3 6 4 6 7 17 27 37 47 8 1 8 2 8 3 8 4 8 9 19 29 3 9 4 9 10 20 30 40 50 √ The first remaining integer after 7 is 11. But 11 is greater than 50 and we are therefore finished. Indeed, we have crossed out all multiples ip with i ≥ 2 of all √ prime numbers p ≤ 50. Since by Lemma 1.19 every composite number ≤ 50 has 8 1. DIVISIBILITY √ a prime factor ≤ 50, this implies that we have crossed out all composite numbers ≤ 50. Hence the remaining numbers 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 are precisely the primes not greater than 50. A variation also works if one wants to find all primes p with a ≤ p ≤ b for given √ 2 ≤ a ≤ b. Write down all integers from a to b and for all prime numbers p ≤ b cross out all multiples of p (except for p itself if it is in the list). The remaining numbers are precisely the prime numbers in the given range. 5. Addendum: Proofs of results in §2 and §3 Note: The material in this section is not examinable. In the following proof we use the fact that every non-empty set S ⊆ N ∪ {0} has a smallest element. This is known as the well-ordering principle. Proof of Lemma 1.5 (Division algorithm). Let S = {a − tb : t ∈ Z, a − tb ≥ 0}. Then S ⊆ N ∪ {0} and S is non-empty (because if t is any integer with t ≤ a/b then a − tb ∈ S). By the well-ordering principle it follows that S contains a smallest element, say r. Since r ∈ S, there exists q ∈ Z such that r = a − qb and r ≥ 0. Also r < b because otherwise r − b = a − (q + 1)b would be an element of S which is smaller than r. This shows the existence of q and r with the stated properties. Suppose that there are two representations a = qb + r = q 0 b + r0 as in the statement of the lemma. Then (q − q 0 )b = r0 − r. Since −b < r0 − r < b it follows that |q − q 0 | · b = |r0 − r| < b and therefore |q − q 0 | = 0. Hence q = q 0 and r = r0 . This shows the uniqueness of q and r. From Euclid’s algorithm in §2 we can also deduce the following. Theorem 1.21. There exist integers s, t ∈ Z such that (a, b) = sa + tb. Proof. By solving the second last equation in Euclid’s algorithm for rn we obtain rn = rn−2 − qn rn−1 , i.e. we have expressed rn as a linear combination of rn−2 and rn−1 . Using rn−1 = rn−3 − qn−1 rn−2 (which follows from the third last equation) we can eliminate rn−1 in the linear combination, rn = rn−2 − qn rn−1 = rn−2 − qn (rn−3 − qn−1 rn−2 ) = (−qn )rn−3 + (1 + qn qn−1 )rn−2 , i.e. we have expressed rn as a linear combination of rn−3 and rn−2 . Continuing like this we obtain an expression of the form rn = sa + tb. From this we obtain (a, b) = sa + tb because rn = (a, b) by Theorem 1.9. Remark 1.22. The proof of Theorem 1.21 shows not only that integers s, t with (a, b) = sa + tb exist, but also how to find such integers by using Euclid’s algorithm. Note that s and t are in Z and not necessarily in N. We remark that s and t are not uniquely determined. Proof of Lemma 1.11. The case of a product with n factors follows easily from the case with two factors. Assume that p | a1 a2 . If p | a1 we are finished. If p - a1 then p and a1 are coprime, and by Theorem 1.21 there exist s, t ∈ Z such that 1 = sp + ta1 . Multiplying this by a2 gives a2 = spa2 + ta1 a2 which shows that a2 is divisible by p (because obviously p | spa2 and by assumption p | ta1 a2 ). 5. ADDENDUM: PROOFS OF RESULTS IN §2 AND §3 9 Proof of Lemma 1.12. Let S = {b ∈ N : b | a and b > 1}. Then S is nonempty (because a ∈ S) and therefore by the well-ordering principle S has a smallest element, say p. We claim that p is a prime factor of a. Clearly p is a factor of a since p ∈ S. If p was composite then p would have a factor r with 1 < r < p; but then r ∈ S which is a contradiction (because p was chosen to be the smallest element in S). Hence p must be a prime number. Proof of Theorem 1.13 (Fundamental theorem of arithmetic). Let a > 1 be an integer. We first show that a is a product of prime numbers. By Lemma 1.12 a has a prime factor, i.e. a = p1 a1 for a prime number p1 and a positive integer a1 . Since p1 ≥ 2 we have a1 < a. If a1 = 1 we are finished. Otherwise apply Lemma 1.12 to a1 to obtain a1 = p2 a2 with p2 prime and 1 ≤ a2 < a1 . Repeating this process we must finally find an = 1 and then a = p1 a1 = p1 p2 a2 = · · · = p1 p2 · · · pn . Next we show uniqueness. If a = p1 · · · pn = q1 · · · qm are two representations of a as product of primes, then by Lemma 1.11 p1 | qi1 for some i1 . Since qi1 is prime this implies that p1 = qi1 . Therefore a/p1 = p2 · · · pn = q1 · · · qi1 −1 qi1 +1 · · · qm . Next we repeat this process for p2 in p2 · · · pn = q1 · · · qi1 −1 qi1 +1 · · · qm , then for p3 , etc. After having cancelled all factors p1 , p2 , . . . , pn on the left hand side and the corresponding qi1 , qi2 , . . . qin on the right hand side, the product of the remaining factors on the right hand side must be equal to 1. Hence there are no remaining factors, i.e. n = m. Now p1 = qi1 , p2 = qi2 , . . . shows that the two product representations a = p1 · · · pn and a = q1 · · · qm only differ by the order of the factors. Proof of Lemma 1.16. For every r ≥ 1 we must show the following statement: If p1 , p2 , . . . , pr are distinct primes, n is any integer and pi | n for i = 1, 2, . . . , r, then p1 p2 · · · pr | n. To do this we use induction on r. First we consider the case r = 1. The statement for r = 1 is: If p1 is a prime, n is an integer and p1 | n, then p1 | n. This is obviously true. Now assume that r ≥ 2 and that we have shown the statement for r − 1. Let p1 , p2 , . . . , pr be distinct primes and n an integer such that pi | n for all i. We must show that p1 p2 · · · pr | n. Since p1 , p2 , . . . , pr−1 are distinct primes which divide n, the induction hypothesis implies that p1 p2 · · · pr−1 | n. So there exists m ∈ Z such that n = p1 p2 · · · pr−1 m. Now it follows from Lemma 1.11 applied to pr | n = p1 p2 · · · pr−1 m that pr divides one of the pi for 1 ≤ i ≤ r − 1 or that pr divides m. But pr - pi for 1 ≤ i ≤ r − 1 (because pr and pi are distinct primes), hence pr | m. It follows that p1 p2 · · · pr−1 pr | p1 p2 · · · pr−1 m = n as required. (There exist several alternative proofs. For example one can use induction on r and the general fact that if a | n, b | n and (a, b) = 1 then ab | n. Or one can use the fundamental theorem of arithmetic.) CHAPTER 2 Basic distribution results In this chapter we show that there are infinitely many prime numbers and we prove various elementary results concerning their distribution among the integers. In particular we show that for x → ∞ the number of primes not greater than x has the same order of magnitude as x/ log(x) (Chebyshev’s theorem), and that for every positive integer n the interval (n, 2n] contains a prime (Bertrand’s postulate). 1. Elementary observations The following result was already known to Euclid (about 325 BC–about 265 BC). Theorem 2.1. There exist infinitely many primes. Proof. Suppose for a contradiction that there exist only finitely many primes, and let p1 , p2 , Q . . . , pn be the complete list of all prime numbers. We consider the n number N = i=1 pi + 1. Then N is greater than 1 and must therefore have a prime factor p (by Lemma 1.12). By assumption the list p1 , p2 , . . . , pn contains all prime numbers, hence p must be equal toQpi for some 1 ≤ i ≤ n, so in particular p Qn n divides i=1 pi .QSince p divides N and i=1 pi , it follows that p also divides the n difference N − i=1 pi = 1. This is a contradiction because 1 is not divisible by any prime number. The next result shows that the sequence of primes contains arbitrarily large gaps. Proposition 2.2. Let N ∈ N. Then there exists a sequence of N consecutive composite numbers. Proof. Consider the N consecutive numbers (N + 1)! + a for 2 ≤ a ≤ N + 1. Each of these numbers is composite because a | (N + 1)! + a and 1 < a < (N + 1)! + a. Now we consider small gaps in the sequence of primes. Clearly the only possibility for two consecutive positive integers (p, p + 1) to be both prime is (2, 3). There are many prime pairs (p, p + 2), i.e. pairs of prime numbers of distance two, for example (3, 5), (5, 7), (11, 13), (17, 19), . . . , however it is not known if there exist infinitely many such pairs. Conjecture 2.3 (Twin prime conjecture). There exist infinitely many prime pairs (p, p + 2). How many prime triplets of the form (p, p + 2, p + 4) are there? One of the three numbers p, p + 2, p + 4 must be divisible by 3 (because if p = 3n then 3 | p; if p = 3n + 1 then 3 | p + 2; if p = 3n + 2 then 3 | p + 4). The only prime number 11 12 2. BASIC DISTRIBUTION RESULTS divisible by 3 is 3 itself, therefore one of the numbers p, p + 2, p + 4 must be equal to 3. Clearly p + 2 = 3 and p + 4 = 3 are impossible, thus the only prime triplet of the form (p, p + 2, p + 4) is (3, 5, 7). No simple formula is known to compute the n-th prime number for given n (of course the sieve of Eratosthenes can be used to compute a list of all prime numbers and therefore to compute the n-th prime, however that’s certainly not a simple formula). 2. The function π We have seen that on the one hand the sequence of prime numbers contains arbitrarily large gaps. On the other hand it is conjectured that there are infinitely many pairs of primes of distance two. Thus the distribution of primes in detail is very irregular. However the average distribution of primes is much more regular. The following table shows the number of primes in the first ten blocks of 1000 integers. range number of primes range number of primes 1 to 1000 168 5001 to 6000 114 1001 to 2000 6001 to 7000 135 117 2001 to 3000 127 7001 to 8000 107 3001 to 4000 120 8001 to 9000 110 4001 to 5000 9001 to 10000 119 112 To study the average distribution of primes it is useful to introduce the function π. For a real number x we define π(x) = the number of primes not greater than x. For example π(7) = 4, π(10) = 4, π(3.14) = 2, π(1) = 0. Figure 1 shows π(x) for x ≤ 30. Note that if we know the function π then we also know all prime numbers: an integer n is prime if and only if π(n) > π(n − 1). Figure 1. π(x) for x ≤ 30 2. THE FUNCTION π 13 Obviously π(x) ≤ x for all x ≥ 0. Theorem 2.1 implies that π(x) → ∞ as x → ∞. One would like to have more precise statements for the behaviour of π(x) as x → ∞. Around 1800, several mathematicians conjectured approximations for π(x) as x → ∞. Legendre suggested in 1798 that π(x) is approximately equal x to the function logx x (and more generally to functions of the form log(x)−A for A ∈ R). Here log x denotes the natural logarithm of x, i.e. the logarithm having base e = 2.718 . . . . Figure 2 shows π(x) and logx x for x ≤ 400. Gauss observed that the logarithmic integral li(x) seems to give a good approximation to π(x) (see Chapter 3, §2 for the definition of li(x)). Figure 2. π(x) and x/ log(x) for x ≤ 400 Of course one has to define precisely what is meant by an approximation to π(x) as x → ∞. A weak notion of approximation is that π(x) and x/ log(x) have the same order of magnitude (see Definition 2.6), in symbols x π(x) as x → ∞. log x This was shown by Chebyshev in 1850 and we will give part of the proof in the next section. A stronger notion of approximation is that π(x) and x/ log(x) are asymptotically equal (see Definition 3.1), in symbols x π(x) ∼ as x → ∞. log x This is the statement of the prime number theorem which was proved in 1896 independently by Hadamard and de la Vallée Poussin. We will discuss the prime number theorem in Chapter 3, §1. Finally Chapter 3, §2 contains a few remarks about the approximation to π(x) given by li(x). 14 2. BASIC DISTRIBUTION RESULTS 3. Chebyshev’s theorem To study the function π, Chebyshev (also spelled Tchebychef) introduced an auxiliary function, the θ-function. It is defined by X θ(x) = log p p≤x for real numbers x (summation over all prime numbers p ≤ x). For example θ(10) = log 2 + log 3 + log 5 + log 7. Chebyshev proved upper and lower estimates for the function θ, and then deduced upper and lower estimates for the function π. The following result is the upper estimate for θ. Lemma 2.4. If x > 0 then θ(x) < log(4) · x. Proof. The statement is clearly true for 0 < x < 1, so we can assume that x ≥ 1. Since θ(x) = θ([x]), it is enough to prove the statement θ(n) < log(4) · n for all n ∈ N. We use induction on n. The cases n = 1 and n = 2 are obviously true. Now assume that n ≥ 3 and that θ(m) < log(4) · m for all m < n. We must distinguish the cases n even and n odd. If n is even then θ(n) = θ(n − 1) < log(4) · (n − 1) < log(4) · n, as required. If n is odd then n = 2m + 1 with m ≥ 1. We will show below that θ(2m + 1) − θ(m + 1) < log(4) · m. It then follows that θ(n) = (θ(2m + 1) − θ(m + 1)) + θ(m + 1) < log(4) · m + log(4) · (m + 1) = log(4) · (2m + 1) = log(4) · n, as required. It remains to show that θ(2m + 1) − θ(m + 1) < log(4) · m for every m ≥ 1. . If p is a prime number with m + 2 ≤ Consider M = 2m+1 = (2m+1)(2m)···(m+2) m! m p ≤ 2m + 1 then p divides M (because p divides the Q numerator of M but not the denominator). Hence by Lemma 1.16 the product m+2≤p≤2m+1 p divides M . On the other hand M < 22m because 2m+1 = 2m+1 m m+1 and these are two of the terms in the binomial expansion of (1 + 1)2m+1 . It follows that ! X Y θ(2m + 1) − θ(m + 1) = log p = log p m+2≤p≤2m+1 m+2≤p≤2m+1 ≤ log M < log(22m ) = log(4) · m. The next lemma gives a weak form of the lower estimate for θ. We omit its proof. Lemma 2.5. There exists a constant c > 0 such that θ(x) > cx for all sufficiently large x. Definition 2.6. Let f and g be functions which are defined for all sufficiently large real numbers, and assume that f (x) and g(x) are positive for all large x. We say that f and g are of the same order of magnitude as x → ∞, in symbols f g as x → ∞, if there exist positive constants a and A such that af (x) < g(x) < Af (x) for all sufficiently large x. 4. BERTRAND’S POSTULATE 15 Example 2.7. Consider the functions f (x) = x2 +x and g(x) = 2x2 . For x > 1 one has f (x) < g(x) < 2f (x), i.e. the condition in Definition 2.6 is satisfied with a = 1 and A = 2. Hence f g as x → ∞. We remark that the order of magnitude relation is symmetric: f g as x → ∞ if and only if g f as x → ∞. From Lemmas 2.4 and 2.5 we can now deduce the order of magnitude of the functions θ(x) and π(x). Theorem 2.8. θ(x) x as x → ∞. Proof. This is immediate from Lemmas 2.4 and 2.5. Theorem 2.9. π(x) x log x as x → ∞. Proof. Since θ(x) = X log p ≤ p≤x X log x = log(x) · p≤x X 1 = log(x) · π(x), p≤x θ(x) x we have π(x) ≥ log x for x > 1. Hence Lemma 2.5 implies that π(x) > c log x for all sufficiently large x. To get the other inequality we note that for x > 0 X X X √ θ(x) = log p ≥ log p ≥ log( x) p≤x √ X 1 = · log(x) · 2 √ x<p≤x √ √ x<p≤x x<p≤x √ 1 1 = · log(x) · π(x) − π( x) . 2 √ √ Now π( x) ≤ x and from Lemma 2.10 below it follows that x < logx x for all sufficiently large x. Using Lemma 2.4 we therefore find that for all sufficiently large x √ x θ(x) log(4) · x x + π( x) < 1 + π(x) ≤ 1 = (2 log(4) + 1) . log x log x · log x · log x 2 2 In the proof of Theorem 2.9 we used the following well-known result from analysis. Lemma 2.10. For any δ > 0, limx→∞ log x xδ = 0. So Lemma 2.10 says that the function log x tends to infinity more slowly than any power xδ (with δ > 0). The proof of Lemma 2.10 can be found in most books on analysis. 4. Bertrand’s postulate The following theorem is known as Bertrand’s postulate. It was conjectured by Bertrand in 1845 and proved by Chebyshev in 1850. Theorem 2.11. For every integer n ≥ 1 there is a prime number p satisfying n < p ≤ 2n. Example 2.12. (1) For n = 1 Bertrand’s postulate states that there is a prime number p such that 1 < p ≤ 2. Clearly p = 2 is the only prime with this property. 16 2. BASIC DISTRIBUTION RESULTS (2) For n = 4 Bertrand’s postulate states that there is a prime number p such that 4 < p ≤ 8. Clearly p = 5 and p = 7 have this property. Hence ‘there is a prime number p’ means ‘there is at least one prime number p’. 8 (3) We know by Bertrand’s postulate applied to n = 1010 −1 = 1099,999,999 99,999,999 that there exists a prime p such that 10 < p ≤ 2 · 1099,999,999 . However at the moment no prime p with this property is known. In fact the largest known prime has only 12,978,189 decimal digits and is therefore less than 1099,999,999 . There is a prize of $150,000 for the discovery of a prime greater than 1099,999,999 (i.e. a prime with at least 100 million decimal digits), see http://www.eff.org/awards/coop for details. Corollary 2.13. Let pn denote the n-th prime number. Then pn ≤ 2n . Proof. By Bertrand’s postulate we know that each of the intervals (1, 2], (2, 4], (4, 8], etc. contains at least one prime number. Hence the interval (1, 2n ] contains at least n prime numbers. Thus the n-th prime number must be contained in this interval, i.e. pn ≤ 2n . 5. Addendum: Proof of Bertrand’s postulate Note: The material in this section is not examinable. Proof of Theorem 2.11. Assume for a contradiction that we have an n such that there is no prime p in the range n < p ≤ 2n. Let N = 2n n . We will find an upper estimate and a lower estimate for log N and obtain a contradiction by showing that these estimates are incompatible (at least for sufficiently large n). This is done in the following three lemmas. Lemma 2.14 (Upper estimate for log N ). √ 2 log N ≤ log(4) · n + 2n · log(2n) 3 for n ≥ 5. Proof. By Lemma 1.17 the prime factorisation of N = 2n n = (2n)! n!·n! is given by N= Y pkp where kp = p≤2n ∞ X 2n n − 2 . pm pm m=1 So (1) log N = X kp log p = p≤2n X p:kp =1 log p + X kp log p p:kp ≥2 P P where p:kp =1 (resp. p:kp ≥2 ) denotes the sum over all prime numbers p for which kp = 1 (resp. kp ≥ 2). We will estimate these two sums separately. By our assumption there are no prime numbers p in the range n < p ≤ 2n, 2 so every prime divisorh p of i N satisfies h ip ≤ n. Now if 3 n < p ≤ n, then we have 2p ≤ 2n < 3p and so 2n p = 2 and n p = 1, hence kp = 0 (in the formula for kp 5. ADDENDUM: PROOF OF BERTRAND’S POSTULATE 17 we only need to consider the summand for m = 1, because p > 23 n implies p2 > 2n for n ≥ 5). Therefore, if p | N then p ≤ 23 n, and so X X X 2 2 (2) log p ≤ log p ≤ log p = θ n ≤ log(4) · n 3 3 2 p:kp =1 p|N p≤ 3 n (the last inequality follows from Lemma 2.4). One easily sees that in the formula for kp each summand h 2n pm i −2 h n pm i is either 0 or 1. Moreover it is clearly equal to 0 for all m > log(2n)/ log(p), so there are at most log(2n)/ log(p) non-zero summands. Thus kp ≤ log(2n)/√ log(p). If kp ≥ 2 √ then 2 ≤ log(2n)/ log(p), i.e. p ≤ 2n. Hence there are at most 2n many prime numbers p with kp ≥ 2, and for each such p we have kp log p ≤ log(2n). This implies X √ (3) kp log p ≤ 2n · log(2n). p:kp ≥2 Combining the equality (1) with the inequalities (2) and (3) shows the upper estimate for log N . Lemma 2.15 (Lower estimate for log N ). log N ≥ 2n log 2 − log(2n) for n ≥ 1. Proof. N is the largest term in the binomial expansion of 22n = (1 + 1)2n , and so 22n ≤ 2nN , since this expansion has 2n + 1 terms, two of which are equal to 1. Hence 2n log 2 ≤ log(2n) + log N . Lemma 2.16. If n > 29 = 512, then √ 2 log(4) · n + 2n · log(2n) < 2n log 2 − log(2n). 3 Proof. It is not difficult to see that the required inequality is equivalent to √ 3(1 + 2n) log(2n) < 2n log 2. We need the following two inequalities, valid for n > 512: √ 33 √ 1 + 2n < · 2n, 32 √ 10 log(2n) < · log(2) · 2n. 32 The first of these inequalities is easy to show. The second one can be seen by √ 10 observing that the function x 7→ 32 · log(2) · 2x − log(2x) is 0 for x = 512 and has positive derivative for all x ≥ 512. Using these inequalities we find that √ √ 33 √ 10 · 2n · · log(2) · 2n < log(2) · 2n, 3(1 + 2n) log(2n) < 3 · 32 32 the last inequality because 990 1024 < 1. Lemmas 2.14, 2.15 and 2.16 imply that √ 2 log N ≤ log(4) · n + 2n · log(2n) < 2n log 2 − log(2n) ≤ log N 3 18 2. BASIC DISTRIBUTION RESULTS for n > 512. This is a contradiction, therefore our assumption that there are no primes p satisfying n < p ≤ 2n was wrong. Hence Theorem 2.11 is true for all n > 512. It remains to consider the case n ≤ 512. Of course we could simply try for each n = 1, 2, . . . , 512 to find a prime p such that n < p ≤ 2n. The method in the following lemma is a bit shorter. Lemma 2.17. For all n ≤ 630 there is a prime p satisfying n < p ≤ 2n. p+1 Proof. If a prime p is given, then n < p ≤ 2n for n = hp+1 , i 2 +1, . . . , p− 2 pk+1 +1 for each k will 1. Hence a list p1 , . . . , pr of primes where p1 = 2 and pk ≥ 2 verify the statement for n = 1, 2, . . . , pr − 1. Such a list is 2, 3, 5, 7, 13, 23, 43, 83, 163, 317, 631 which verifies the statement for all n up to n = 630. We have shown that the statement in the theorem holds for all n > 512 and for all n ≤ 630, thus it holds for all n ∈ N. This completes the proof of Theorem 2.11. CHAPTER 3 The prime number theorem In the previous chapter we saw that the functions π(x) and x/ log(x) have the same order of magnitude. A stronger result is true: π(x) and x/ log(x) are asymptotically equal. This is the statement of the prime number theorem which we discuss in this chapter. We also consider the approximation to π(x) given by the logarithmic integral li(x). The Riemann hypothesis can be formulated as a conjecture about the error term |π(x) − li(x)| in this approximation. 1. Statement of the prime number theorem Definition 3.1. Let f and g be functions which are defined for all sufficiently large real numbers, and assume that f (x) and g(x) are positive for all large x. We say that f and g are asymptotically equal as x → ∞, in symbols f ∼g as x → ∞, if f (x)/g(x) → 1 for x → ∞, i.e. the limit limx→∞ f (x)/g(x) exists and is equal to 1. (Some authors use the expression asymptotically equivalent instead of asymptotically equal). Example 3.2. (1) x + 1 ∼ x as x → ∞. (2) x2 +x ∼ x2 as x → ∞. Note that in this example for x → ∞ the difference (x2 + x) − (x2 ) tends to infinity even though the quotient (x2 + x)/(x2 ) tends to 1. Lemma 3.3. If f ∼ g as x → ∞ then f g as x → ∞. Proof. f ∼ g as x → ∞ means that limx→∞ f (x)/g(x) = 1. Hence for all sufficiently large x we have 21 < f (x)/g(x) < 23 and thus 12 g(x) < f (x) < 23 g(x). This shows that g f as x → ∞ and therefore (since the order of magnitude relation is symmetric) f g as x → ∞. Recall that for a real number x we defined π(x) by π(x) = #{p ≤ x : p prime}. Theorem 3.4 (Prime number theorem). x π(x) ∼ as log x x → ∞. The prime number theorem was proved in 1896 independently by Hadamard and by de la Vallée Poussin. Both proofs use methods from complex analysis to deduce the prime number theorem from certain properties of the Riemann zeta function. In 1948 Selberg and Erdös gave a new proof of the prime number theorem which didn’t require any complex analysis. This new proof is now known as the elementary proof of the prime number theorem. 19 20 3. THE PRIME NUMBER THEOREM Remark 3.5. It follows from Lemma 3.3 that the prime number theorem implies Chebyshev’s theorem π(x) x/ log(x) as x → ∞ (Theorem 2.9). We now deduce two corollaries from the prime number theorem. Corollary 3.6. Let pn denote the n-th prime number. Then pn ∼ n log n as n → ∞. Here pn ∼ n log n as n → ∞ means limn→∞ 3.1 for the variable n ∈ N. pn n log n = 1, i.e. we use Definition Proof of Corollary 3.6. By the prime number theorem we have π(x) log x (4) lim = 1. x→∞ x Taking the logarithm gives limx→∞ log π(x) + log(log x)− log x = 0, and dividing this by log x shows that limx→∞ (5) lim x→∞ log π(x) log x + log(log x) log x − 1 = 0. Therefore log π(x) log(log x) = 1 − lim = 1, x→∞ log x log x log(log x) log x = 0 by Lemma 2.10. Using (4) and (5) we obtain π(x) log π(x) π(x) log x log π(x) lim = lim · = 1. x→∞ x→∞ x x log x because limx→∞ Now take x = pn . Then π(x) = n, so lim n→∞ n log n = 1. pn By Bertrand’s postulate (Theorem 2.11) the interval (x, 2x] contains a prime number for every integer x ≥ 1. This is not true if we replace the factor 2 by a smaller number (e.g. (1, δ · 1] doesn’t contain a prime if δ < 2). However if we restrict to large enough x then the statement remains true as the following corollary shows. Corollary 3.7. Let δ > 1. Then for all large enough x, the interval (x, δx] contains a prime number. Proof. The interval (x, δx] contains a prime number if and only if π(δx) − π(x) ≥ 1. Thus we must show that π(δx) − π(x) ≥ 1 for all sufficiently large x. We have π(δx) x/ log(x) δx/ log(δx) π(δx) = · · . π(x) δx/ log(δx) π(x) x/ log(x) By the prime number theorem limx→∞ δx/π(δx) log(δx) = 1 and limx→∞ For the third factor we find δx/ log(δx) log(x) =δ· →δ as x → ∞. x/ log(x) log(δ) + log(x) Hence limx→∞ π(δx) π(x) x/ log(x) π(x) = 1. = δ. Now fix any γ with 1 < γ < δ. From limx→∞ π(δx) π(x) = δ it follows that π(δx) ≥ γπ(x) for all sufficiently large x, and from π(x) → ∞ as x → ∞ it follows that (γ − 1)π(x) ≥ 1 for all sufficiently large x. Thus for all large enough x we obtain π(δx) − π(x) ≥ (γ − 1)π(x) ≥ 1 as required. 2. ADDENDUM: ERROR TERMS AND RIEMANN HYPOTHESIS 21 2. Addendum: Error terms and Riemann hypothesis Note: The material in this section is not examinable. The prime number theorem states that π(x) ∼ logx x as x → ∞. We can therefore consider logx x as a reasonable approximation to π(x). A different approximation is given by the function li(x) which is defined as follows. Definition 3.8. For x ≥ 2 define Z li(x) = 2 x 1 dt. log t The function li(x) is called the logarithmic integral. (Some books use the notation Li(x) for this function.) One can show that li(x) ∼ theorem is equivalent to x log x as x → ∞ and that therefore the prime number π(x) ∼ li(x) as x → ∞. So li(x) can also be considered as an approximation to π(x). The following figure shows π(x) and li(x) for x ≤ 400. To measure the quality of the two approximations to π(x) we must estimate the error terms |π(x) − logx x | and |π(x) − li(x)|. Example 3.9. The following table gives some values of the functions π(x), x/ log(x) and li(x). The values of x/ log(x) and li(x) are rounded to the nearest 22 3. THE PRIME NUMBER THEOREM integer. x π(x) x/ log(x) li(x) 103 168 145 177 106 78498 72382 78627 109 50847534 48254942 50849233 From Example 3.9 one gets the impression that li(x) is a better approximation to π(x) than logx x . This is indeed the case: one can show that for large x the difference |π(x) − li(x)| is smaller than the difference |π(x) − logx x |. It is a very difficult problem to find good upper bounds for |π(x) − li(x)|. The Riemann hypothesis is the following conjecture about the existence of such upper bounds. Conjecture 3.10 (Riemann hypothesis). Let ε > 0. Then |π(x) − li(x)| < x1/2+ε for all sufficiently large x. Remark 3.11. (1) Usually the Riemann hypothesis is formulated as a conjecture about the zeros of the Riemann zeta function. The Riemann zeta function, denoted by ζ(s), is a meromorphic function of a complex variable s, and the Riemann hypothesis states that if ζ(s) = 0 and 0 < Re(s) < 1, then Re(s) = 21 . In this form the Riemann hypothesis was conjectured by Riemann in 1859. One can show that this formulation is equivalent to the formulation given in Conjecture 3.10. (2) There is a prize of $1 million for the solution of the Riemann hypothesis. See http://www.claymath.org/millennium/ for details. CHAPTER 4 Arithmetic functions and Dirichlet series An arithmetic function is a function from the positive integers to the complex numbers. To such a function we can associate a Dirichlet series, which is a differentiable function of a real (or complex) variable. The most important example of a Dirichlet series is the Riemann zeta function which we consider first. 1. The Riemann zeta function Definition 4.1. The Riemann zeta function, denoted by ζ(s), is the function of a real variable s > 1 defined by the series ∞ X 1 . ζ(s) = ns n=1 We must check that the series converges for s > 1. Since all summands in the PN series are positive, it suffices to show that the partial sums n=1 n−s are bounded above. These partial sums can be estimated as follows. N X n−s = 1 + N X n−s n=2 N n=1 Z <1+ x−s dx < 1 + 1 PN −s Z 1 RN ∞ x−s dx = 1 + 1 . s−1 −s Here the inequality < 1 x dx can be seen by comparing the area n=2 n under the curve x−s for 1 ≤ x ≤ N to the sum of the areas of the rectangles of width 1 and height 2−s , 3−s , . . . , N −s under this curve, as illustrated in the following picture (in the picture s = 1.5, but for any s > 1 one obtains a similar picture). Remark 4.2. ferentiable. (1) One can show that the Riemann zeta function is dif23 24 4. ARITHMETIC FUNCTIONS AND DIRICHLET SERIES (2) Riemann (in 1859) studied the function s 7→ ζ(s) as a function of a complex variable s (the series in Definition 4.1 converges for all complex numbers s with real part greater than 1). To consider complex s is important for many questions in analytic number theory (including the prime number theorem), but we will not discuss it in this course. The following theorem shows that the Riemann zeta function is closely related to prime numbers. Theorem 4.3 (Euler product). For all s > 1, Y 1 . ζ(s) = 1 − p−s p Proof. Recall the following formula for the geometric series (valid for |x| < 1) 1 = 1 + x + x2 + . . . . 1−x In this formula we let x = p−s (which is valid because |p−s | < 1 for s > 1) and obtain 1 = 1 + p−s + p−2s + . . . . 1 − p−s If we take p = 2, 3, 5, . . . , M (where M is a prime) and multiply the series together, we obtain ∞ ∞ ∞ X X Y X −s 1 · · · 2a2 3a3 · · · M aM . = −s 1−p a =0 a =0 a =0 p≤M 2 3 M From the fundamental theorem of arithmetic (Theorem 1.13) we know that a number n ∈ N has a representation of the form 2a2 3a3 · · · M aM if and only if n doesn’t have any prime factors greater than M . Moreover every such number n has only one such representation. Hence Y X 1 = n−s , 1 − p−s p≤M n∈N (M ) where N (M ) = {n ∈ N : if p | n then p ≤ M }. The set N (M ) includes all numbers up to M , so that ∞ ∞ X X X 0≤ n−s − n−s ≤ n−s , n=1 n∈N (M ) n=M +1 and the last sum tends to 0 as M → ∞. Hence ∞ X X Y n−s = lim n−s = lim n=1 M →∞ n∈N (M ) M →∞ p≤M 1 , 1 − p−s as required. Remark 4.4. The essential step in the proof was the existence of a unique prime factorisation for every positive integer. Therefore the Euler product can be considered as an analytic expression of the fundamental theorem of arithmetic (Theorem 1.13). Proposition 4.5. ζ(s) → ∞ as s → 1+. Here s → 1+ means that s tends to 1 from the right, i.e. s → 1 and s > 1. 1. THE RIEMANN ZETA FUNCTION 25 R∞ Proof of Proposition 4.5. For every s > 1 the integral 1 x−s dx is smaller P∞ the sum n=1 n−s (this can be seen from the following picture: the integral Rthan P∞ ∞ −s x dx is the area under the curve x−s for 1 ≤ x < ∞ and the sum n=1 n−s 1 is the sum of the areas of the rectangles). Thus for every s > 1 we have ζ(s) = ∞ X n −s n=1 Since 1 s−1 Z > ∞ x−s dx = 1 1 . s−1 → ∞ as s → 1+, it follows that ζ(s) → ∞ as s → 1+. Remark 4.6. We can use the Euler product for the Riemann zeta function and Proposition 4.5 to give a new proof of the fact that there are infinitely many prime numbers. SupposeQfor a contradiction that there are only finitely many primes. Then the product p (1 − p−s )−1 has only finitely many factors. It follows that lim ζ(s) = lim s→1+ s→1+ Y Y Y (1 − p−s )−1 = lim (1 − p−s )−1 = (1 − p−1 )−1 , p p s→1+ p contradicting ζ(s) → ∞ as s → 1+. The following result was shown by Euler in 1737. P Corollary 4.7. The series p p1 is divergent. P Proof. For every s > 1 the series p p−s is convergent because it is a subseries P∞ P of n=1 n−s . We first show that p p−s → ∞ as s → 1+. Note that log 1 x2 x3 =x+ + + ... 1−x 2 3 for |x| < 1 and so log 1 p−2s p−3s −s = p + + + .... 1 − p−s 2 3 26 4. ARITHMETIC FUNCTIONS AND DIRICHLET SERIES Therefore taking the logarithm of the Euler product gives ! Y 1 log ζ(s) = log 1 − p−s p X 1 = log 1 − p−s p X p−2s p−3s = p−s + + + ... 2 3 p = X p−s + p X X p−ks p k≥2 k . The second summand is bounded by 1 because X X p−ks XX X X X p−2 < p−k = p−2 p−k = k 1 − p−1 p p p p k≥2 k≥2 < ∞ X k≥0 −2 ∞ X n 1 1 = − = 1. 1 − n−1 n−1 n n=2 n=2 P −s Hence > log ζ(s) − 1 for all s > 1. Since ζ(s) → ∞ as s → 1+ (by pp P Proposition 4.5), this implies that p p−s → ∞ as s → 1+. P P P If p p−1 was convergent then p p−s < p p−1 for all s > 1, which is imP possible because the left hand side tends to infinity as s → 1+. Hence p p−1 is divergent. 2. Arithmetic functions Definition 4.8. An arithmetic function is a function from the set of positive integers to the complex numbers. (Some authors call this an arithmetical function.) So if f is an arithmetic function then for every n ∈ N we have a number f (n) ∈ C. The idea is that for an arithmetic function f the value f (n) contains some interesting arithmetical information about n. In all our examples the values of f will be real numbers (but arithmetic functions with complex values are important in more advanced applications). P In the following we will consider only positive divisors, e.g. in d|n the sum is over all positive divisors d of n. Example 4.9. The following functions are arithmetic functions. (1) u(n) = 1 for all n ∈ N. (2) d(n) = #{d P ∈ N : d | n}, so d(n) is the number of positive divisors of n. (3) σ(n) = d|n d, so σ(n) is the sum of all positive divisors of n. Definition 4.10. An arithmetic function f is called multiplicative if f (mn) = f (m)f (n) whenever (m, n) = 1. Note that for a multiplicative function f the equality f (mn) = f (m)f (n) holds for all coprime m, n ∈ N; if m, n are not coprime then f (mn) and f (m)f (n) may or may not be equal. 3. DIRICHLET SERIES 27 If f is a multiplicative function then f (1) = f (1 · 1) = f (1)f (1) and therefore either f (1) = 0 (in which case f (n) = f (1 · n) = f (1)f (n) = 0 for all n ∈ N) or f (1) = 1. A multiplicative function f is uniquely determined by its values on powers of primes: if n ∈ N then by the fundamental theorem of arithmetic we can Q Q write n = p|n pkp , and since f is multiplicative we have f (n) = p|n f (pkp ). Example 4.11. (1) The arithmetic function n 7→ u(n) = 1 is multiplicative, because if (m, n) = 1 then u(mn) = 1 = u(m)u(n) (in fact this is true for all m, n, the condition (m, n) = 1 is not needed in this example). (2) The arithmetic function n 7→ log n is not multiplicative. For example log(2 · 3) 6= log(2) · log(3). Lemma 4.12. Let f : N →PC be an arithmetic function. Define an arithmetic function g : N → C by g(n) = d|n f (d). If f is multiplicative then g is multiplicative. Proof. Let m, n ∈ N with (m, n) = 1. We must show that g(mn) = g(m)g(n). Now d | mn if and only if d = d1 d2 with d1 | m and d2 | n, and in this case d1 and d2 are uniquely determined (see Lemma 1.15). Hence X X X X g(mn) = f (d) = f (d1 d2 ) = f (d1 ) · f (d2 ) = g(m)g(n), d|mn d1 |m,d2 |n d1 |m d2 |n as required. P P Example 4.13. We have d(n) = d|n 1 = d|n u(d) where d(n) and u(n) are defined in Example 4.9. Furthermore u is multiplicative by Example 4.11. Lemma 4.12 implies that d is multiplicative. Note that for the function d we really need the condition (m, n) = 1 to ensure that d(mn) = d(m)d(n). For example if m = n = 2 then d(2 · 2) = 3 but d(2) · d(2) = 4. 3. Dirichlet series Definition 4.14. A Dirichlet series is a series of the form ∞ X a(n) F (s) = ns n=1 where a(n) ∈ C. P∞ We say that the Dirichlet series F (s) = n=1 a(n) ns is associated to the arithmetic function a(n). The Dirichlet series associated to an arithmetic function a(n) allows us to study a(n) with methods from analysis. P∞ Example 4.15. The Riemann zeta function ζ(s) = n=1 n1s (see §1) is the Dirichlet series associated to the arithmetic function u(n) = 1 for all n ∈ N. In a Dirichlet series, s is a real variable (or more generally a complex variable). Of course, for F (s) to be defined one must check that the series converges. And to study Dirichlet series in more detail one also needs to know for which s the series is absolutely convergent, whether it is uniformly convergent, etc. We showed convergence in the case of the Riemann zeta function in §1 (for s > 1), but from now on we will ignore all convergence questions. We can perform various operations on Dirichlet series, e.g. differentiate or multiply them. The result will again be a Dirichlet series as the following two lemmas show. 28 4. ARITHMETIC FUNCTIONS AND DIRICHLET SERIES P∞ P∞ b(n) Lemma 4.16. Let F (s) = n=1 a(n) n=1 ns be two Dirichlet ns and G(s) = series. Then their product is given by a Dirichlet series, more precisely F (s)G(s) = ∞ X c(n) ns n=1 with c(n) = X a(d)b(n/d). d|n Proof. The product is F (s)G(s) = ∞ X ∞ X a(d)b(i) ds is d=1 i=1 = ∞ X X a(d)b(n/d) ns n=1 d|n = ∞ X n=1 P d|n a(d)b(n/d) ns where we set n = di. (Analytic remark: To justify the rearrangement of the infinite sums requires some convergence arguments.) P∞ Lemma 4.17. Let F (s) = n=1 P∞ b(n) with b(n) = − log(n) · a(n). n=1 ns Proof. d −s ) ds (n F 0 (s) = d ds a(n) ns be a Dirichlet series. Then F 0 (s) = = − log(n) · n−s and therefore X ∞ a(n) ns n=1 = (Analytic remark: We used that vergence arguments.) d ds X ∞ ∞ X d a(n) − log(n) · a(n) . = s ds n ns n=1 n=1 P = P d ds ; to justify this requires some con The following examples show that many Dirichlet series associated to interesting arithmetic functions can be expressed in terms of the Riemann zeta function. Example 4.18. (1) The Dirichlet series associated to the identity funcP∞ tion N → N, n 7→ n, is n=1 nns . We have ∞ ∞ X X n 1 = = ζ(s − 1). s s−1 n n n=1 n=1 P∞ a More generally, for any a ∈ R we have n=1 nns = ζ(s − a). P ∞ (2) ζ(s)2 = n=1 d(n) ns where d(n) is as in Example 4.9. This holds because P ∞ ∞ ∞ ∞ X X X d(n) 1 X 1 d|n 1 · 1 ζ(s) · ζ(s) = · = = . s s s n n n ns n=1 n=1 n=1 n=1 (3) ζ(s − 1)ζ(s) = because P∞ n=1 σ(n) ns where σ(n) is as in Example 4.9. This holds ∞ ∞ ∞ X X n X 1 ζ(s − 1)ζ(s) = · = ns n=1 ns n=1 n=1 (4) ζ 0 (s) = − P∞ n=1 log(n) ns P d|n d ns ·1 = ∞ X σ(n) . ns n=1 4. ADDENDUM: THE MÖBIUS FUNCTION 29 4. Addendum: The Möbius function Note: The material in this section is not examinable. Definition 4.19. The Möbius function is the arithmetic function µ defined by if n = 1, 1 µ(n) = 0 if p2 | n for some prime p, (−1)k if n = p1 p2 · · · pk where the pi are distinct primes. P Lemma 4.20. The arithmetic function n 7→ d|n µ(d) is given by ( X 1 if n = 1, µ(d) = 0 if n > 1. d|n Proof. It is easy to check P that µ is multiplicative. From Lemma 4.12 it follows that the function n 7→ d|n µ(d) is also multiplicative, and it is therefore determined by its values on prime powers. For n = pk we find ( X 1 if k = 0, µ(d) = 1 − 1 + 0 · · · + 0 = 0 if k > 0. k d|p This shows the result. P∞ Lemma 4.21. n=1 µ(n) ns −1 = ζ(s) . P∞ Proof. We compute the product of the two Dirichlet series n=1 P∞ 1 ζ(s) = n=1 ns . Using Lemmas 4.16 and 4.20 we find P ∞ ∞ ∞ ∞ X X X µ(n) µ(n) X 1 d|n µ(d) · ζ(s) = · = = 1. ns ns n=1 ns ns n=1 n=1 n=1 P∞ −1 Hence n=1 µ(n) . ns = ζ(s) µ(n) ns and Theorem 4.22 (Möbius inversion formula). For arithmetic functions f and g, the following statements are equivalent: P (1) g(n) = d|n f (d) for all n ∈ N, P (2) f (n) = d|n µ(d)g(n/d) for all n ∈ N. Proof. Assume that (1) holds. Then X X X X X µ(d)g(n/d) = µ(d) f (c) = f (c) µ(d) = f (n) d|n d|n c| n d c|n d| n c where for the last equality we used Lemma 4.20. Furthermore we used that a pair (c, d) of positive integers satisfies d | n and c | nd if and only if it satisfies c | n and d | nc . Assume that (2) holds. Then X XX XX XX f (d) = µ(c)g(d/c) = µ(d/c)g(c) = µ(d0 )g(c) = g(n) d|n d|n c|d d|n c|d c|n d0 | n c where we used that a pair (c, d) of positive integers satisfies d | n and c | d if and only if the pair (c, d0 ) = (c, d/c) satisfies c | n and d0 | nc . CHAPTER 5 Primes and arithmetic progressions In this chapter we discuss (without proofs) two deep results relating prime numbers and arithmetic progressions. The first result is Dirichlet’s theorem on primes in arithmetic progressions which states that an arithmetic progression a, a + b, a + 2b, a + 3b, . . . contains infinitely many prime numbers if a and b are coprime. The second result is a recent theorem by Green and Tao showing that there are arbitrarily long (but finite) arithmetic progressions a, a + b, a + 2b, . . . , a + (k − 1)b consisting solely of primes. 1. Primes in arithmetic progressions Let a and b be positive integers. Does the arithmetic progression a, a + b, a + 2b, a + 3b, . . . contain infinitely many prime numbers, i.e. are there infinitely many prime numbers which are of the form a + nb for some integer n ≥ 0? Example 5.1. We fix b = 4 and look what happens for different values of a. a = 1: The arithmetic progression 1 + n · 4 is 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, . . . which contains many prime numbers. a = 2: The arithmetic progression 2 + n · 4 is 2, 6, 10, 14, . . . which contains only the prime number 2. All numbers 2 + n · 4 with n ≥ 1 are composite because 2 | 2 + n · 4 and 1 < 2 < 2 + n · 4 for n ≥ 1. a = 3: The arithmetic progression 3+n·4 is 3, 7, 11, 15, 19, 23, 27, 31, 35, . . . which contains many prime numbers. a = 4: The arithmetic progression 4+n·4 is 4, 8, 12, 16, . . . which doesn’t contain any prime numbers, because 2 | 4 + n · 4 and 1 < 2 < 4 + n · 4 for n ≥ 0. We observe that every arithmetic progression in Example 5.1 either contains many primes or it contains at most one prime. This observation is explained by the following two results. Lemma 5.2. Let a and b be positive integers. If a and b are not coprime then the arithmetic progression a + nb, n = 0, 1, 2, . . . , contains at most one prime number. Proof. Let d = (a, b). By assumption a and b are not coprime and therefore d > 1. If n > 0 then a + nb is composite because d | a + nb and 1 < d < a + nb. Hence the arithmetic progression a + nb contains at most one prime, more precisely if a + 0 · b is composite then it contains no prime, and if a + 0 · b is prime then it contains precisely one prime. Theorem 5.3. Let a and b be positive integers. If a and b are coprime then the arithmetic progression a + nb, n = 0, 1, 2, . . . , contains infinitely many prime numbers. 31 32 5. PRIMES AND ARITHMETIC PROGRESSIONS Theorem 5.3 is known as ‘Dirichlet’s theorem on primes in arithmetic progressions’. It was proved by Dirichlet in 1837 using analytic methods (more precisely a certain kind of Dirichlet series), but for certain small values of a and b one can also give elementary proofs. Example 5.4. (1) There exist infinitely many prime numbers which are of the form 3 + 8n for some integer n ≥ 0. Indeed since (3, 8) = 1 this follows directly from Theorem 5.3. (2) Consider the arithmetic progression 26 + 39n, n = 0, 1, 2, . . . . Since (26, 39) = 13 > 1 we can apply Lemma 5.2 which shows that there exists at most one prime in this arithmetic progression. In fact one easily sees that there is no prime in this arithmetic progression: for all n ≥ 0, 26 + 39n is composite because 13 | 26 + 39n and 1 < 13 < 26 + 39n. (3) There exist infinitely many prime numbers whose decimal expansion ends with the digit 9. To see this we first observe that the decimal expansion of a number p ends with the digit 9 if and only if p is of the form 9 + 10n for some integer n ≥ 0. By Theorem 5.3 there are infinitely many primes of the form 9 + 10n (note that (9, 10) = 1 and that therefore Theorem 5.3 can be applied), hence there are infinitely many primes ending with the digit 9. 2. Addendum: Arithmetic progressions in the sequence of primes Note: The material in this section is not examinable. In the previous section we considered an arithmetic progression a, a + b, a + 2b, a + 3b, . . . and asked how many prime numbers it contains. Now we consider the sequence of all prime numbers 2, 3, 5, 7, 11, . . . and look for arithmetic progressions contained in it. In other words, we look for arithmetic progressions consisting solely of primes. We first note that there is no infinite arithmetic progression a, a + b, a + 2b, . . . (with a, b ∈ N) which consists solely of prime numbers. Indeed, if a is a prime number then a + ab is composite (because a | a + ab and 1 < a < a + ab). Next we consider finite arithmetic progressions. A sequence of the form a, a + b, a + 2b, . . . , a + (k − 1)b with a, b ∈ N is called an arithmetic progression of length k. What can we say about arithmetic progressions of length k consisting solely of prime numbers? Example 5.5. (1) The sequence 5, 11, 17, 23, 29 (that is 5 + i · 6 for 0 ≤ i ≤ 4) is an arithmetic progression of length 5 consisting solely of prime numbers. (2) The sequence 199, 409, 619, 829, 1039, 1249, 1459, 1669, 1879, 2089 (that is 199 + i · 210 for 0 ≤ i ≤ 9) is an arithmetic progression of length 10 consisting solely of prime numbers. If all the numbers a, a + b, a + 2b, . . . , a + (k − 1)b are prime, then both a and b must satisfy certain lower bounds depending on k. More precisely we have the following two results. Lemma 5.6. If a, a + b, a + 2b, . . . , a + (k − 1)b is an arithmetic progression of length k consisting solely of prime numbers then a ≥ k. 2. ADDENDUM: ARITHMETIC PROGRESSIONS IN THE SEQUENCE OF PRIMES 33 Proof. The number a+ab is composite (it’s divisible by a, and 1 < a < a+ab). Therefore a + ab can’t be in the given arithmetic progression, i.e. a ≥ k. Proposition 5.7. If a, a+b, a+2b, . . . , a+(k −1)b is an arithmetic progression of length k consisting solely of prime numbers then b is divisible by every prime p < k. Proof. Let p < k be a prime number. The first p terms of the progression are a, a + b, a + 2b, . . . , a + (p − 1)b. We consider the remainder of these p numbers when divided by p. Assume for a contradiction that all these p remainders are distinct. Then all possible remainders 0, 1, . . . , p − 1 must occur. So in particular there is a t satisfying 0 ≤ t ≤ p − 1 such that a + tb has remainder 0, that is p | a + tb. But a + tb ≥ a ≥ k > p (the inequality a ≥ k is Lemma 5.6), hence a + tb is composite contradicting our assumption that all numbers in the given arithmetic progression are prime. We have shown that two of the remainders must be equal. In other words, there exist integers i, j with 0 ≤ i < j ≤ p − 1 such that a + ib and a + jb have the same remainder when divided by p. It follows that the difference (a+jb)−(a+ib) = (j−i)b is divisible by p, and therefore that p divides j −i or b. However p | j −i is impossible (because 0 < j − i < p) and thus we must have p | b. Example 5.8. (1) We consider arithmetic progressions of length k = 5. Then we must have a ≥ 5 (by Lemma 5.6) and 6 | b (because 2 | b and 3 | b by Proposition 5.7). So the arithmetic progression of length 5 in Example 5.5.(1) is the smallest possible example. (2) If k = 10 then a ≥ 10 and 210 = 2 · 3 · 5 · 7 | b. Hence the arithmetic progression of length 10 in Example 5.5.(2) has the smallest possible b. Lemma 5.6 and Proposition 5.7 show that if a, a + b, a + 2b, . . . , a + (k − 1)b is an arithmetic progression of length k consisting solely of primes then a and b satisfy certain properties. However these results do not imply that such arithmetic progressions exist for every k, and until recently it had been an open question if the prime numbers contain arbitrarily long arithmetic progressions. The problem was solved in 2004 when Green and Tao proved the following theorem. Theorem 5.9. For every k ≥ 1, the prime numbers contain infinitely many arithmetic progressions of length k. Appendices Notation Notation N Z R C #S (a, b] Explanation set of all positive integers set of all integers set of all real numbers set of all complex numbers number of elements of a set S interval {x : a < x ≤ b} Page 3 3 3 3 b|a b-a (a, b) N ! k P Qp b divides a b doesn’t divide a greatest common divisor of a and b N factorial binomial coefficient sum indexed by all primes p product indexed by all primes p ≤ N 3 3 4 6 7 6 6 [x] π(x) θ(x) ζ(s) s → 1+ log(x) li(x) greatest integer ≤ x number of primes ≤ x Chebyshev’s theta function Riemann zeta function s tends to 1 from the right natural logarithm logarithmic integral 6 12 14 23 24 13 21 n p≤N as x → ∞ same order of magnitude as x → ∞ ∼ as x → ∞ asymptotically equal as x → ∞ 14 19 u(n) d(n) σ(n) µ(n) 26 26 26 29 constant function 1 number of positive divisors of n sum of positive divisors of n Möbius function 35 36 APPENDICES Further reading The topics in this course belong to the areas of elementary number theory and analytic number theory. There exist many introductory textbooks which cover some or most of the material, for example the books in the following list. All of these books also discuss various topics which were not mentioned in this course. Books on analytic number theory assume some knowledge of complex analysis. [1] T. M. Apostol, Introduction to analytic number theory, Springer-Verlag, 1976. (Covers all relevant elementary and analytic number theory.) [2] D. M. Burton, Elementary number theory, McGraw-Hill Education, 6th ed., 2005. (A very detailed introduction to elementary number theory.) [3] G. H. Hardy, E. M. Wright, An introduction to the theory of numbers, Oxford University Press, 6th ed., 2008. (A classical introduction to all areas of number theory.) [4] A. E. Ingham, The distribution of prime numbers, Cambridge University Press, 1934, reprinted 1990. (A classical, very analytic book about the prime number theorem, error estimates, etc.) [5] G. J. O. Jameson, The prime number theorem, Cambridge University Press, 2003. (Everything about the prime number theorem (including analytic and elementary proofs) and related material.) A proof of the prime number theorem (Theorem 3.4) is contained in [1], [3], [4] and [5]. For more information on the material in Chapter 3, §2 see [4] and [5]. Dirichlet’s theorem on primes in arithmetic progressions (Theorem 5.3) is proved in [1] and [5]. The two most recent results mentioned in this course are not yet contained in textbooks. For the AKS primality test (mentioned in Remark 1.20) see [6], and for Green and Tao’s theorem (Theorem 5.9) see [7]. (Warning: [6] and [7] are research papers, they are much more difficult than the textbooks [1]–[5].) [6] M. Agrawal, N. Kayal, N. Saxena, PRIMES is in P, Annals of Mathematics 160 (2004), 781–793. [7] B. Green, T. Tao, The primes contain arbitrarily long arithmetic progressions, Annals of Mathematics 167 (2008), 481–547. APPENDICES 37 The first 400 prime numbers 2 31 73 127 179 233 283 353 419 467 3 37 79 131 181 239 293 359 421 479 5 41 83 137 191 241 307 367 431 487 7 43 89 139 193 251 311 373 433 491 11 47 97 149 197 257 313 379 439 499 13 53 101 151 199 263 317 383 443 503 17 59 103 157 211 269 331 389 449 509 19 61 107 163 223 271 337 397 457 521 23 67 109 167 227 277 347 401 461 523 29 71 113 173 229 281 349 409 463 541 547 557 563 569 571 577 587 593 599 601 607 613 617 619 631 641 643 647 653 659 661 673 677 683 691 701 709 719 727 733 739 743 751 757 761 769 773 787 797 809 811 821 823 827 829 839 853 857 859 863 877 881 883 887 907 911 919 929 937 941 947 953 967 971 977 983 991 997 1009 1013 1019 1021 1031 1033 1039 1049 1051 1061 1063 1069 1087 1091 1093 1097 1103 1109 1117 1123 1129 1151 1153 1163 1171 1181 1187 1193 1201 1213 1217 1223 1229 1297 1381 1453 1523 1597 1663 1741 1823 1901 1231 1301 1399 1459 1531 1601 1667 1747 1831 1907 1237 1303 1409 1471 1543 1607 1669 1753 1847 1913 1249 1307 1423 1481 1549 1609 1693 1759 1861 1931 1259 1319 1427 1483 1553 1613 1697 1777 1867 1933 1277 1321 1429 1487 1559 1619 1699 1783 1871 1949 1279 1327 1433 1489 1567 1621 1709 1787 1873 1951 1283 1361 1439 1493 1571 1627 1721 1789 1877 1973 1289 1367 1447 1499 1579 1637 1723 1801 1879 1979 1291 1373 1451 1511 1583 1657 1733 1811 1889 1987 1993 2063 2131 2221 2293 2371 2437 2539 2621 2689 1997 2069 2137 2237 2297 2377 2441 2543 2633 2693 1999 2081 2141 2239 2309 2381 2447 2549 2647 2699 2003 2083 2143 2243 2311 2383 2459 2551 2657 2707 2011 2087 2153 2251 2333 2389 2467 2557 2659 2711 2017 2089 2161 2267 2339 2393 2473 2579 2663 2713 2027 2099 2179 2269 2341 2399 2477 2591 2671 2719 2029 2111 2203 2273 2347 2411 2503 2593 2677 2729 2039 2113 2207 2281 2351 2417 2521 2609 2683 2731 2053 2129 2213 2287 2357 2423 2531 2617 2687 2741