The Prime Number Theorem 1 We study the distribution of primes via the function π(x) = the number of primes ≤ x 6 5 4 3 2 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 It’s easier to draw this way: π(x) = the number of primes ≤ x 6 5 4 3 2 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 Clearly, π(x) < x (not every number is prime) and lim π(x) = ∞ 80 60 x→∞ 40 (there are infinitely many primes) 20 100 200 300 400 500 How many primes are there among the first 1 000 000 000 integers? By brute force, π(1 000 000 000) = 50 847 534. Can we approximate π(x) using elementary functions? 4 Gauss’s Prime Number Conjecture (1792) π(x) ≈ x π(x) x for large x. log(x) x log(x) 102 25 21.7 103 168 144.8 104 1229 1085.7 105 9592 8685.9 106 78 498 72 382.4 107 664 579 620 421.0 π(x) − x π(x) − x/ log(x) log(x) π(x) 3.3 23.2 143.3 906.1 6115.6 44 158.3 0.1320 0.1381 0.1166 0.0945 0.0779 0.0664 5 In terms of limits, we may write Gauss’s 1792 conjecture as π(x) − x/ log(x) = 0 x→∞ π(x) lim or x/ log(x) = 1. x→∞ π(x) lim Gauss’s Conjecture of 1849 ∫ π(x) ≈ For large x, 2 x dt log t or ∫ lim x→∞ x dt 2 log t = 1. π(x) def ∫ Aside: Li(x) = µ x dt . log t 6 ( ) x log(x) lim ∫ x = 1. x→∞ dt 2 log t Exercise: ( Corollary: If either lim x→∞ ( lim x→∞ x log(x) π(x) ) =1 x log(x) π(x) (Hint: l’Hôpital) ) ∫ x dt log(t) or lim 2 exists, then x→∞ π(x) ∫ x dt log(t) is equivalent to lim 2 = 1. x→∞ π(x) 7 The Prime Number Theorem 40 π(x) ) = 1. lim ( x→∞ x log(x) 30 20 10 50 100 150 200 The convergence is very slow: At x = 106, π(x)/(x/ log(x)) ≈ 1.08449 At x = 109, π(x)/(x/ log(x)) ≈ 1.05373 At x = 1012, π(x)/(x/ log(x)) ≈ 1.03915. 8 It’s also messy. 1.09040 1.09035 π(x) ) y=( x log(x) 1.09030 1.09025 1.09020 1.09015 500 500 501 000 501 500 502 000 5.00002 ´ 108 5.00002 ´ 108 1.05582 1.07118 1.05582 1.05582 1.07117 1.05582 1.05582 1.07116 1.05582 1.00005 ´ 107 1.00010 ´ 107 1.00015 ´ 107 1.00020 ´ 107 5.00001 ´ 108 5.00001 ´ 108 9 The first proofs of the Prime Number Theorem (1896) use the Riemann Zeta Function ∞ ∑ 1 1 1 1 ζ(s) = = + + + ··· s s s s n 1 2 3 n=1 From calculus, we know 1 1 1 ζ(1) = + + + · · · 1 2 3 1 1 1 ζ(2) = 2 + 2 + 2 + · · · 1 2 3 1 1 1 ζ(4) = 4 + 4 + 4 + · · · 1 2 3 Vallée-Poussin diverges π2 converges to 6 π4 converges to 90 Hadamard 10 The function ζ(s) is defined for 2 all s = x + iy in C, 1 0.0 0 with a simple pole at s = 1. 0.5 20 1.0 0 1.5 What’s the connection with primes? 2.0 -20 80 60 40 20 100 200 300 400 500 Riemann 11 Fix a number M . Let Example: M = 8. Then PM = {p1, p2, . . . , pr : pi ≤ M } = set of primes ≤ M . Let P8 = {2, 3, 5, 7} and ΛM = { n ∈ Z+ : prime factors of n are in PM } . Note that ΛM is infinite and Λ8 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, . . .} = {2α1 3α2 5α3 7α4 : each αi is a non-negative integer} contains {1, 2, 3, . . . , M }. 12 Recall that P8 = {2, 3, 5, 7}. Consider the product ( ) ( ) 1 1 1 1 1 1 + + + · · · × + + + ··· 20 21 22 30 31 32 ) ( ) ( 1 1 1 1 1 1 × 0 + 1 + 2 + ··· × 0 + 1 + 2 + ··· 5 5 5 7 7 7 Each term in the expansion has the form ( ) 1 α1, α2, α3, α4 are where are non-negative integers 2α1 3α2 5α3 7α4 These denominators are exactly the elements of Λ8, and we get ) ∑ 1 ∏ (1 1 1 + + + ··· = . p0 p1 p2 n p ∈P8 n∈Λ8 13 Furthermore, by the geometric series theorem, we know that ( ) ∞ ( )r ∑ 1 1 1 1 1 + + + · · · = = 1. p0 p1 p2 p 1 − p r=0 So we get ) ∏ (1 ∑ 1 1 1 = + + + ··· n p0 p1 p2 p ∈P8 n∈Λ8 ∏ 1 = 1 1 − p p ∈P8 ( )( )( )( ) 1 1 1 1 105 = = . 24 1 − 12 1 − 13 1 − 51 1 − 71 1+ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + + + + + + + + + + + + + + + + ··· 2 3 4 5 6 7 8 9 10 12 14 15 16 18 20 21 14 More generally, we have Lemma: Extension of Lemma: ∏ p ∈PM Now ∑ 1 1 = n 1 − p1 n∈Λ M ΛM ⊃ {1, 2, 3, . . . , M }, ∞ ∑ 1 1 = = ζ(s) 1 s n 1 − ps n=1 p ∏ all so M ∑ ∑ 1 1 > . n n n=1 n∈ΛM This gives us the Corollary: ∏ p ∈PM M ∑ 1 1 > n 1 − p1 n=1 15 As M → ∞, ∏ p ∈PM 1 → 1 − p1 ∏ all 1 1 1 − p primes and M ∑ 1 n=1 n → ∞ ∏ so that all 1 Corollary: → ∞, 1 ) ( 1 − ∏ p 1 primes = 0 1 − and we get p all p That is, 1 2 4 6 10 12 16 18 22 28 × × × × × × × × × × ··· 2 3 5 7 11 13 17 19 23 29 can be made arbitrarily small. 16 A small digression: Claim: ∏ all primes ( ) 1 1− =0 p implies ∑ 1 is divergent p p prime Remark: This gives another proof of the fact that there are infinitely many primes. The proof of the claim itself follows from a Lemma: Let 1 > a1 > a2 > a3 >∑ · · · be a decreasing sequence of positive numbers such that an converges. Then ∞ ∏ (1 − an) ̸= 0 n=1 . 17 Proof sketch Because ∑ an converges, we can find N so that ∞ ∑ n=N S= ∞ ∑ n=1 Write 1 an < . 2 an = a1 + a2 + · · · + aN −1 + |aN + aN{z+1 + · ·}· | {z } < 12 >S− 12 ∞ N −1 ∞ ∏ ∏ ∏ (1 − an). (1 − an) = (1 − an) × n=1 n=1 n=N It will suffice to show that the second factor is non-zero. 18 Write ∞ ∏ (1 − an) = (1 − aN )(1 − aN +1)(1 − aN +2) · · · n=N = 1 − ∑ ai i + ∑ ai aj i<j − ∑ aiaj ak i<j<k + ··· where all the indices start at N . 19 We can then show that ∑ 1 ∑ 1 ai < , ai aj < 2 , 2 2 i<j i and ∑ ai > i ∑ ∑ ai aj ak < i<j<k ai aj > i<j ∑ 1 , 23 and so on, aiaj ak > · · · i<j<k That is, the right side of ∞ ∏ n=N (1 − an) = 1 − ∑ i ai + ∑ i<j ai aj − ∑ ai aj ak + · · · i<j<k satisfies the hypotheses of the Alternating Series Test. By the AST, the series (and therefore the product) converges to a number ∑ ∑ 1 ai. Since ai < , we know that this number is between 1 and 1 − 2 i i non-zero. 20 Old Stuff: ∑1 n is divergent. 1 ∑1 New Stuff: p is divergent. 1 1+ 1 2 3 4 1 1 1 1 1 1 + + + + + + ··· = ∞ 2 3 4 5 6 7 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 1 1 1 1 1 + + + + + + ··· = ∞ 2 3 5 7 11 13 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 The harmonic series diverges slowly: The 1/p series diverges very slowly: It takes about a million terms to get to a sum of 12. A million terms gets you only to about 3.07. But with either series, if you add up enough terms, you can make the sum as large as you want. 21 ? Estimating π(x) Using Probability ? ? M ?? Pick a random X with X > M and X “near” M . What’s the probability that you get a prime? ( ) 1 1 Pr(X is not divisible by 2) = 2 = 1 − 2 ( ) Pr(X is not divisible by 3) = 32 = 1 − 13 ( ) 4 1 Pr(X is not divisible by 5) = 5 = 1 − 5 ... Pr(X is not divisible by any prime in PM ) ? ? ? ) ∏ ( 1 1 = 1− = ∑ . 1 p p∈PM n n∈ΛM 22 Heuristic 1: Example Among the numbers between M and M + ∆M , the proportion of primes is about 1 ∑ 1. n n∈ΛM n∈Λ5 000 000 and There are approximately ∆M ∑ 1 n∈ΛM 100 ∑ 1 ≈ 3.6398 n π(5 000 100) − π(5 000 000) = 4. n primes in the interval [M, M +∆M ]. 23 Heuristic 2: We can approximate M ∑ 1 ∑ 1 with . n n n=1 n∈ΛM In fact, M ∑ ∑ 1 1 = + n n n=1 n∈ΛM ∑ n∈ΛM n>M 1 . n What happens to the second summation on the right as M → ∞? The number M ∑ 1 n=1 n is called the M th harmonic number. 24 Heuristic 1 + Heuristic 2: Example There are approximately ∆M M ∑ 1 n=1 100 (2 000 000 ) ≈ 6.6287 ∑ 1 primes n in the interval [M, M + ∆M ]. n=1 n and π(2 000 100) − π(2 000 000) = 6. 25 Heuristic 3: 1.2 1.0 M ∑ 1 n=1 n 0.8 0.6 ≈ log(M + 1). 0.4 0.2 0 4 ∑ 1 1 ∫ 2 3 4 5 5 1 dx, which is log(5), plus the n x 1 n=1 dark red “steps,” whose total area is less than 1. The picture shows that is equal to In fact, we have ] [M ∑1 lim − log(M + 1) → γ M →∞ n n=1 So for large M , M ∑ 1 n=1 n ≈ log(M + 1) + γ. where γ ≈ 0.5772. 26 Heuristic 1 + Heuristic 2 + Heuristic 3: There are approximately ∆M log(M + 1) + γ primes in the interval [M, M + ∆M ]. That is, π(M + ∆M ) − π(M ) ≈ ∆M log(M + 1) + γ or π(M + ∆M ) − π(M ) ≈ ∆M log(M or d [π(M )] ≈ dM log(M 1 + 1) + γ 1 . + 1) + γ 27 Calculus? In a Number Theory talk? Now that we know (approximately) the derivative of π(x), we can use the Fundamental Theorem of Calculus to find π(x) itself. Using the fact that π(2) = 1, we get 40 ∫ x π(x) − π(2) ≈ 2 so that ∫ π(x) ≈ 1 + 2 dt log(t + 1) + γ 30 20 10 x dt . log(t + 1) + γ 50 100 150 200 28 Comparing the approximations π(x) ∫ 1+ 2 150 x 1 dt log(t + 1) + γ x log(x) 100 50 200 400 600 800 1000 29 Our approximation ∫ π(x) ≈ 1 + 2 x 1 dt log(t + 1) + γ can be “simplified” to e−γ [Ei(log(x + 1) + γ) − Ei(log(3) + γ)], where Ei is the exponential integral function, ∫ ∞ −t e Ei(z) = − dt. t −z But it can’t be written in terms of elementary functions. 30 The good news is that you can use l’Hôpital’s rule to show that ( ) ∫ x 1 1+ dt log(t + 1) + γ 2 ( ) lim = 1, x→∞ x log(x) so by the real Prime Number Theorem, our heuristic approximation also “works.” That is, π(x) ) = 1. x 1 dt log(t + 1) + γ 2 ∫ lim ( x→∞ 1+ 31 Some numbers x x log(x) ∫ 1+ x (log(x + 1) + γ)−1 dt π(x) 2 106 72 382 75 182 78 498 109 48 254 942 49 394 762 50 847 532 1012 36 191 206 825 1015 28 952 965 460 217 36 807 618 212 37 607 912 018 29 338 656 062 654 ??? 32