Applications, Asymptotics & Frontiers

the prime number theorem

The prime numbers — 2, 3, 5, 7, 11, ... — thin out as you go higher, but not erratically: they thin out in a smooth, predictable way. The prime number theorem makes this precise. It says that the number of primes up to a large number x, written pi(x), is approximately x / log x; more sharply, the density of primes near a large number x is about 1 / log x. So roughly one number in every log x near x is prime, and the bigger x grows, the rarer primes become, at exactly that logarithmic rate.

Stated as a limit: pi(x) divided by (x / log x) tends to 1 as x -> infinity, and the still better approximation is the logarithmic integral, pi(x) approximately (integral from 2 to x of dt / log t). The astonishing thing is how this counting statement about integers is proved — by complex analysis. The bridge is the Riemann zeta function zeta(s) = sum over n of 1 / n^s, which by Euler's product factors over the primes. Taking the logarithmic derivative converts the product over primes into a sum over primes, and a contour integral (a Mellin-Perron formula) then expresses pi(x), or its smoother cousin the prime-counting weight psi(x), in terms of the zeros of zeta(s). The leading term x comes from the simple pole of zeta at s = 1; every nontrivial zero of zeta at a point rho contributes an oscillating correction of size x^(Re rho). The theorem follows once you know that no zero has real part equal to 1 — that zeta does not vanish on the line Re(s) = 1 — which pushes all the oscillating corrections below the main term.

This is the headline triumph of analytic number theory and the canonical example of complex analysis reaching into a completely different subject: a fact about whole numbers, decided by where a holomorphic function does and does not vanish. The honest frontier lies just beyond. The size of the error term in the prime number theorem is governed by how far left the zeros of zeta sit, and the Riemann hypothesis — the conjecture that every nontrivial zero has real part exactly 1/2 — would give the best possible error bound. It remains unproved, one of the deepest open problems in mathematics, so the prime number theorem is settled but its sharpest form waits on the zeros of zeta.

Up to x = 1,000,000 there are exactly 78,498 primes. The crude estimate x / log x gives about 72,382 (low by about 8 percent), while the logarithmic integral (integral from 2 to x of dt / log t) gives about 78,627 — strikingly close. The error shrinks, relatively, as x grows, exactly as the theorem promises.

pi(x) tracks x/log x, and far more closely the logarithmic integral.

The theorem is about the AVERAGE density of primes, not about gaps or patterns: it does not say primes appear at regular intervals, and individual gaps can be far larger or smaller than log x; twin primes, for instance, are a separate open question entirely.

Also called
PNTasymptotic law of prime numbers質數定理素數定理