Working notes on the primes

Grant Golland’s working notes on how the prime numbers are spread out. Every figure is computed here from a sieve of all 5 761 455 primes below 100 000 000, or with mpmath, and its caption says how. A sibling site, Zeta Zeros, covers the zeros that control these patterns.

Sentences carry a flag: Settled for proved theorems or computations on a stated range, Open for conjectures. A numerical match is never a proof.

Step 8

The explicit formula: primes from zeta zeros

Riemann found, and von Mangoldt proved in 1895, an exact formula that writes the prime count as a smooth main term minus one wave for every zero of the zeta function.

For x not a prime power, ψ(x) = x − Σρ xρ/ρ − log 2π − ½ log(1 − x−2), with the sum over the nontrivial zeros ρ of ζ(s), taken in pairs ρ, ρ̄ in order of height. Each pair contributes a wave whose frequency is the zero’s height.

Chebyshev ψ(x), which jumps by log p at every prime power p^k, for x from 2 to 60 (dark steps), with von Mangoldt's explicit formula truncated after 10 (red), 40 (gold) and 200 (teal) pairs of zeta zeros. With more zeros the wave sum sharpens into the staircase.
Zeros computed with mpmath zetazero(n) for n = 1 to 200 (the first is 1/2 + 14.134725…i). The truncated sums are evaluated at 1 200 points from x = 2 to 60; the true ψ(x) comes from the sieve. With finitely many zeros the curve rings near each jump (Gibbs-like overshoot), as expected for a truncated wave sum. Motion is off if your system asks for reduced motion.
  • Settled von Mangoldt (1895) proved the explicit formula for ψ(x); Riemann (1859) wrote the corresponding one for π(x).
  • Settled Zeros off the critical line would produce waves that grow faster than √x and would show up as larger errors in π(x). That is why the Riemann Hypothesis is equivalent to a √x-sized error term.
  • Open Whether all zeros lie on the line Re s = 1/2 is the Riemann Hypothesis, still open.

The Zeta Zeros site has an interactive version where you choose how many zeros to use, and pages on where the zeros sit and how they are spaced.

Reading path · step 9 of 11