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 4

Dirichlet’s theorem: primes in progressions

Every prime after 5 ends in 1, 3, 7 or 9. Do all four endings occur forever, and equally often? Dirichlet proved yes, for every progression that is allowed to contain primes.

Bar chart of the 5761451 primes between 7 and 10^8 by last digit: 1, 3, 7, 9. Each is very close to a quarter. Counts: 1: 1440298, 3: 1440473, 7: 1440495, 9: 1440186.
Sieve: numpy boolean sieve of Eratosthenes to 108, 23 October 2026 PT, giving π(108) = 5 761 455 (matches the standard value). Of the 5 761 452 primes from 7 to 108, the four classes differ from a quarter by at most 0.003 percent. Motion is off if your system asks for reduced motion.
  • Settled Dirichlet (1837): if a and q share no common factor, the progression a, a + q, a + 2q, … contains infinitely many primes. He invented L-functions to prove it; the same functions appear on the Zeta Zeros site.
  • Settled de la Vallée Poussin (1896) proved the even split: each of the φ(q) allowed classes gets a share 1/φ(q) of the primes in the long run. For q = 10, φ(10) = 4.
  • Settled Green and Tao (2008): the primes contain arithmetic progressions of every finite length, such as 5, 11, 17, 23, 29.
  • Open Linnik (1944) proved the least prime in a progression is at most qL for a fixed L (now L = 5, Xylouris 2011). The conjectured exponent is near 1; with the Generalized Riemann Hypothesis, about 2 is known.