The Prime Number Theorem and Dirichlet's Theorem
One-line statement: The Prime Number Theorem (PNT) asserts , while Dirichlet's Theorem guarantees infinitely many primes in every admissible arithmetic progression with . Key result in words: Primes thin out logarithmically, and they distribute evenly among the admissible residue classes modulo . Where it applies: Analytic number theory, cryptography, sieve theory, random matrix heuristics, distribution of arithmetic functions. Who/when: Conjectured by Gauss (1792–1796) and Legendre (1798); Dirichlet (1837) for progressions; PNT proved independently by Hadamard and de la Vallée Poussin (1896).
Counting primes is a problem in harmonic analysis on the integers. The link is the Euler product, which encodes the multiplicative structure of into an analytic object. Taking logarithms converts the product over primes into a sum, and a contour integral (Perron's formula) inverts that sum back into a count. The location of zeros of the relevant -function controls the error term: the boundary of the critical strip ( being zero-free) gives the qualitative asymptotic, while the Riemann Hypothesis would give the optimal square-root error. Dirichlet's masterstroke was to detect a single residue class with characters — orthogonal functions that act as a discrete Fourier basis on — turning "primes " into a linear combination of .
Formal Statement
Let range over primes. Define
Derivation hint: (Chebyshev's first function) sums logs of primes; (second function) sums the von Mangoldt function if and otherwise, weighting prime powers. The logarithmic integral is
Derivation hint: integrate by parts repeatedly on to generate the asymptotic series; this shows but is a strictly better approximant.
A Dirichlet character mod is a completely multiplicative function , periodic mod , with iff . The associated L-function is
Derivation hint: the Euler product follows from complete multiplicativity of plus unique factorization; expand each factor as a geometric series and multiply. The principal character takes value on units; then .
As ,
Derivation hint: partial summation (Abel summation) converts between , , ; the three statements are equivalent. The form is analytically cleanest. With the classical (de la Vallée Poussin) zero-free region, the sharpest unconditional error is
Derivation hint: the error stems from a zero-free region ; optimizing the contour shift against the -dependence yields the rate. Under RH this improves to .
If , the arithmetic progression contains infinitely many primes. Quantitatively (PNT for progressions),
Derivation hint: the factor reflects equidistribution over the invertible residue classes; it follows from for all combined with the orthogonality of characters.
Why It Holds / Derivation
Step 1 — Logarithmic derivative. From the Euler product , take and differentiate:
Derivation hint: ; differentiate term-by-term to recover as Dirichlet coefficients.
Step 2 — Perron / contour inversion. Express the smoothed count as a contour integral:
Derivation hint: is the discontinuous Heaviside integral, equal to for and for ; integrating term-by-term over recovers .
Step 3 — Shift the contour to . Move the line of integration leftward. The pole of at (simple, residue ) gives a simple pole with residue , contributing the main term:
Derivation hint: near , , so ; multiply by and read off the residue at , giving .
Step 4 — Non-vanishing on the line . The crux: for all real . This uses the inequality
Derivation hint: apply this with to ; the nonnegativity forces to not vanish faster than allows, ruling out a zero at .
Step 5 — Tauberian conclusion. With no zeros on , the boundary integral over contributes . The Wiener–Ikehara Tauberian theorem (or Newman's contour argument) then converts the analytic behavior into . Partial summation gives .
∎Step 1 — Orthogonality of characters. For ,
Derivation hint: the characters form an orthonormal basis of functions on ; this is the column-orthogonality relation of the character table of a finite abelian group.
Step 2 — Sum over primes. Multiply by and sum:
Derivation hint: by the same logarithmic-derivative computation as for ; substitute and use orthogonality from [11].
Step 3 — Behavior at . The principal character term contributes a pole (from up to local factors), giving divergence :
Derivation hint: only gives a pole; the non-principal terms stay bounded — provided — so they cannot cancel the divergence.
Step 4 — The hard lemma: for . Complex characters: a vanishing would force , producing a double cancellation contradicting (a Dedekind-zeta-type product with nonnegative Dirichlet coefficients). Real characters (the delicate case): follows from Dirichlet's class number formula (real) or (imaginary), all manifestly positive. Derivation hint: the real-character case is the unique one resisting purely analytic argument; the class number formula identifies with a positive geometric/arithmetic invariant of a quadratic field.
Step 5 — Conclusion. Since [13] diverges as , the sum has infinitely many terms — there are infinitely many such primes, and the leading constant yields equidistribution.
∎Though the PNT was proved by Hadamard and de la Vallée Poussin, its entire framework descends from Riemann's single 1859 memoir "Über die Anzahl der Primzahlen unter einer gegebenen Größe." In eight pages, Riemann analytically continued to all of , established the functional equation relating to , introduced the explicit formula expressing as a sum over the nontrivial zeros , and conjectured that all such zeros lie on . His explicit formula \psi_0(x) = x - \sum_\rho \frac{x^\rho}{\rho} - \log(2\pi) - \tfrac{1}{2}\log(1-x-2) makes precise the slogan: the primes are music, and the zeros are the frequencies. Every modern error term in PNT is a statement about how far left the zeros stay.
Building Intuition
Think of as the "prime mass" placed at . The Euler product says this mass is multiplicatively organized. Taking a Dirichlet series is like taking a Fourier/Laplace transform: smooth, global behavior of the transform ( near ) encodes the average density of mass, while singularities away from (the zeros) encode oscillations in the prime count. The main term in comes from the one pole at . Each zero contributes a wave — an oscillation of amplitude and frequency in . If any zero had , its wave would be as large as the main term and PNT would fail; that is exactly why is the heart of the proof. For Dirichlet: characters are the Fourier modes on the clock face . Asking "is ?" is asking for one Fourier coefficient. The principal character is the "DC component" carrying the bulk ; the others are bounded ripples — if their -functions don't vanish at .
```svg
```
Worked Examples
Given: . True value: .
Step 1 — Crude PNT estimate. . So
Relative error vs. truth: .
Step 2 — Logarithmic integral. Numerically . Relative error: — far superior.
Step 3 — Why Li wins. includes the correction series ; the first correction alone adds , recovering most of the gap.
Given: Estimate primes with . Here , , and so the class is admissible.
Step 1 — Total primes. .
Step 2 — Equidistribution prediction. By PNT for progressions [6], each of the admissible classes () should hold :
Step 3 — Compare to actual count. The true value is — within of prediction, illustrating tight equidistribution. (Small "Chebyshev bias" effects favor non-quadratic-residue classes, a subtler second-order phenomenon.)
Common Misconceptions
" means ." False. Asymptotic equivalence means , not . In fact — the difference grows roughly like .
" always overestimates ." Numerically true for all tested , but false in principle: Littlewood (1914) proved changes sign infinitely often. The first sign change occurs below Skewes' number, an astronomically large bound, never yet reached by computation.
"Dirichlet's theorem needs the Riemann Hypothesis." No — it only needs , an unconditional fact. RH (and GRH) only sharpen the error terms, not existence.
"Primes are equally likely in all residue classes mod ." Only among the coprime classes. Classes with contain at most one prime. And even among coprime classes, the Chebyshev bias gives a slight, persistent preference for quadratic non-residues.
Non-admissible progression. The progression has , so every term is divisible by — it contains no primes at all (beyond none). Dirichlet's hypothesis is essential; dropping it destroys the conclusion entirely.
Failure without non-vanishing. If one hypothetically allowed for some real , the proof of [13] collapses: the bounded character terms could cancel the principal-term divergence, and one could not conclude infinitely many primes in the class. This is exactly why the real-character case (handled via the class number formula) is the linchpin of the entire theorem.
Connections
The PNT and Dirichlet's theorem sit at the confluence of several frameworks. The Euler product ties them to Unique Factorization and the multiplicative structure of . The analytic engine is the Riemann Zeta Function and its generalization to Dirichlet L-functions, both special cases of Automorphic L-functions in the Langlands program. The non-vanishing arguments belong to the broader theory of Tauberian Theorems (Wiener–Ikehara, Newman). The error term in [5] is governed by Zero-Free Regions, whose conjectural optimum is the Riemann Hypothesis; for progressions the analogue is the Generalized Riemann Hypothesis. Equidistribution links to Chebotarev Density Theorem (the Galois-theoretic generalization where Dirichlet's theorem is the abelian case over ). Sieve-theoretic refinements connect to the Bombieri–Vinogradov Theorem, which gives GRH-quality average control unconditionally.
Real-World Applications
Historical Development
Subtleties & Limits
The Riemann Hypothesis (RH) asserts every nontrivial zero of has . It is equivalent to the optimal error — and remains unproven, a Clay Millennium Problem. The Generalized RH (GRH) extends this to all Dirichlet -functions, controlling uniformly.
Uniformity in (the deep frontier). PNT for progressions [6] is known to hold with good error only for small relative to . The Siegel–Walfisz theorem gives uniformity for but with an ineffective constant, because of the possible existence of Siegel zeros — exceptional real zeros of extremely close to for real . No one has ruled out Siegel zeros; their hypothetical existence would not contradict known theorems but would distort prime distribution and is the single most stubborn obstruction to effective bounds.
Chebyshev's bias. Numerically, for a quadratic non-residue tends to exceed that for residues. Rubinstein–Sarnak (1994) showed this bias has a precise meaning under GRH plus a linear independence hypothesis on zeros — but it remains conditional.
Largest known prime gaps and Cramér's model. PNT controls averages, not individual gaps; the maximal gap below is conjectured (Cramér) to be , far beyond current proof.
See Also
Riemann Zeta Function · Dirichlet L-functions · Riemann Hypothesis · Generalized Riemann Hypothesis · Chebotarev Density Theorem · Selberg–Erdős Elementary Proof · Siegel–Walfisz Theorem · Chebyshev Bias · Bombieri–Vinogradov Theorem · Class Number Formula