Home › Number Theory › Lesson 10

The Distribution of Primes

Lesson 10 of 13

Key idea of this section

π(x) ~ x / log x   (the prime number theorem, 1896).

Counting functions

Let π(x) be the number of primes ≤ x. Chebyshev introduced the weighted counts

θ(x) = ∑ₚ≤ₓ log p,     ψ(x) = ∑ₚᵏ≤ₓ log p = ∑ₙ≤ₓ Λ(n),

where the von Mangoldt function is Λ(n) = log p if n = pᵏ and 0 otherwise. Unique factorisation gives log = Λ ∗ 1, the identity behind every analytic approach. Partial summation shows that π(x) ~ x/log x, θ(x) ~ x and ψ(x) ~ x are equivalent statements. Euler's divergence of ∑ 1/p (Problem 47) already shows that the primes are much denser than the squares.

Chebyshev's bounds

Theorem 10.1 (Erdős's form of Chebyshev's upper bound). For every integer n ≥ 1, ∏ₚ≤ₙ p < 4ⁿ; hence θ(x) < x log 4 for x ≥ 1.

Proof. Induction on n; the cases n = 1, 2 are clear. If n > 2 is even, n is not prime and the claim follows from n − 1. If n = 2m + 1, every prime p with m + 1 < p ≤ 2m + 1 divides the binomial coefficient C(2m + 1, m) = (2m + 1)!/(m!(m + 1)!), since it divides the numerator but not the denominator. This coefficient appears twice in the expansion of (1 + 1)2m+1 (as C(2m + 1, m) and C(2m + 1, m + 1)), so C(2m + 1, m) ≤ 22m = 4ᵐ. Therefore

∏ₚ≤₂ₘ₊₁ p ≤ (∏ₚ≤ₘ₊₁ p) · C(2m + 1, m) < 4m+1 · 4ᵐ = 42m+1. ∎

Theorem 10.2 (Chebyshev's lower bound). For every integer n ≥ 1, π(2n) ≥ n log 2 / log(2n).

Proof. By Legendre's formula vₚ(m!) = ∑ₖ≥₁ ⌊m/pᵏ⌋, the exponent of p in N = C(2n, n) is

vₚ(N) = ∑ₖ≥₁ (⌊2n/pᵏ⌋ − 2⌊n/pᵏ⌋).

Each term is 0 or 1 (since ⌊2y⌋ − 2⌊y⌋ ∈ {0, 1}) and vanishes once pᵏ > 2n, so pvₚ(N) ≤ 2n. Every prime factor of N is ≤ 2n, so N ≤ (2n)π(2n). On the other hand N = ∏ₖ₌₁ⁿ (n + k)/k ≥ 2ⁿ. Taking logarithms, π(2n) log(2n) ≥ n log 2. ∎

Combining the two theorems with the trivial estimate π(x) − π(√x) ≤ θ(x)/log √x shows that c·x/log x < π(x) < C·x/log x for suitable constants and all x ≥ 2: the order of magnitude x/log x, conjectured by Legendre and Gauss from tables, is correct. Refining the same binomial coefficient argument (showing that no prime in (2n/3, n] divides C(2n, n)) proves Bertrand's postulate, first proved by Chebyshev in 1852: for every n ≥ 1 there is a prime p with n < p ≤ 2n.

Mertens' theorems (1874) sharpen this further:

∑ₚ≤ₓ (log p)/p = log x + O(1),   ∑ₚ≤ₓ 1/p = log log x + M + O(1/log x),   ∏ₚ≤ₓ (1 − 1/p) ~ e−γ/log x,

where M ≈ 0.2615 is the Meissel–Mertens constant.

The prime number theorem

Theorem 10.3 (Hadamard; de la Vallée Poussin, 1896). π(x) ~ x/log x. More precisely, with li(x) = ∫₀ˣ dt/log t (principal value),

π(x) = li(x) + O(x e−c√(log x))   for some c > 0.

The numbers bear this out. For x = 10⁶: π(x) = 78 498, x/log x ≈ 72 382, li(x) ≈ 78 628. For x = 10⁹: π(x) = 50 847 534, x/log x ≈ 48 254 942, li(x) ≈ 50 849 235. The logarithmic integral is far more accurate, and it is the natural main term: heuristically the "probability" that n is prime is 1/log n. The proof of 1896 rests on Riemann's memoir of 1859, which treats ζ(s) as a function of a complex variable s = σ + it. ζ extends to a meromorphic function on ℂ with a single simple pole at s = 1, satisfies the functional equation

ξ(s) = ξ(1 − s),   ξ(s) = π−s/2 Γ(s/2) ζ(s),

and has trivial zeros at −2, −4, −6, …; all other zeros (the non-trivial zeros) lie in the critical strip 0 < σ < 1. The decisive input for the prime number theorem is that ζ(s) has no zeros on the line σ = 1. Riemann's explicit formula expresses ψ(x) as x minus a sum over the non-trivial zeros ρ of xρ/ρ (plus small terms), so the location of the zeros controls the error term. Elementary proofs, avoiding complex analysis, were found by Selberg and Erdős in 1949; Newman's short proof (1980) uses only Cauchy's theorem.

The Riemann hypothesis

Conjecture 10.4 (Riemann hypothesis). Every non-trivial zero of ζ(s) has real part 1/2.

It is equivalent to the error estimate π(x) = li(x) + O(√x log x) (von Koch, 1901), and in explicit form to |π(x) − li(x)| < √x log x/(8π) for all x ≥ 2657 (Schoenfeld, 1976). More than 10¹³ zeros have been computed and all lie on the critical line. The Riemann hypothesis is one of the Clay Millennium Prize Problems. Its analogue for curves over finite fields was proved by Weil (1948), and for general varieties over finite fields by Deligne (1974). A curious fact: π(x) < li(x) for every x for which π(x) has been computed, yet Littlewood proved in 1914 that the difference changes sign infinitely often.

Primes in arithmetic progressions

Theorem 10.5 (Dirichlet, 1837). If gcd(a, q) = 1, the progression a, a + q, a + 2q, … contains infinitely many primes. In fact ∑ 1/p over primes p ≡ a (mod q) diverges, and (by the prime number theorem for progressions) the primes are equidistributed among the φ(q) coprime classes:

π(x; q, a) ~ (1/φ(q)) · x/log x.

Dirichlet's proof introduced characters χ of (ℤ/qℤ)× and the L-functions L(s, χ) = ∑ χ(n)n⁻ˢ; orthogonality of characters isolates a single class, and the crux is that L(1, χ) ≠ 0 for every non-principal χ. For special progressions elementary proofs exist (Problems 23 and 24). The study of these L-functions and of their zeros (the generalised Riemann hypothesis) occupies a large part of modern analytic number theory.

Open problems and recent progress

The twin prime conjecture (infinitely many p with p + 2 prime) is open, but Zhang (2013) proved that lim inf (pₙ₊₁ − pₙ) < 7 · 10⁷, and Maynard and the Polymath project lowered the bound to 246. Green and Tao (2004) proved that the primes contain arbitrarily long arithmetic progressions. The ternary Goldbach conjecture (every odd n > 5 is a sum of three primes) was proved by Helfgott in 2013; the binary Goldbach conjecture remains open.

Exercise

  • (a)
    Using Theorem 10.1 and the estimate π(x) − π(√x) ≤ θ(x)/log √x, show that π(x) < √x + 4 log 2 · x/log x for x ≥ 2.
  • (b)
    Compute the exponents of 3 and of 7 in C(100, 50) using Legendre's formula.
  • (c)
    Explain why ζ(s) has no zero with real part σ > 1.
Show solution

Answers: (a) Each prime in (√x, x] contributes log p > (1/2)log x to θ(x), so (π(x) − π(√x)) · (1/2)log x < θ(x) < x log 4, giving π(x) < π(√x) + 2x log 4/log x ≤ √x + 4 log 2 · x/log x. (b) For p = 3 the terms are ⌊100/3⌋ − 2⌊50/3⌋ = 33 − 32 = 1, ⌊100/9⌋ − 2⌊50/9⌋ = 11 − 10 = 1, ⌊100/27⌋ − 2⌊50/27⌋ = 3 − 2 = 1 and ⌊100/81⌋ − 2⌊50/81⌋ = 1 − 0 = 1, so v₃ = 4. For p = 7: ⌊100/7⌋ − 2⌊50/7⌋ = 14 − 14 = 0 and ⌊100/49⌋ − 2⌊50/49⌋ = 2 − 2 = 0, so 7 does not divide C(100, 50) at all. (Kummer's theorem says vₚ(C(m + n, n)) is the number of carries when adding m and n in base p; 50 = 101 in base 7 and 50 + 50 involves no carries.) (c) For σ > 1 the Euler product converges absolutely, and an absolutely convergent product of non-zero factors (1 − p⁻ˢ)⁻¹ is non-zero.

V.3.1