The Prime Number Theorem: Statement and Heuristics

How many primes are there below a given size xx? How does that count grow? This question is simple to state. It occupied the greatest number theorists of the eighteenth and nineteenth centuries. This ranges from Gauss's teenage tabulations of primes to Riemann's revolutionary 1859 memoir. That memoir connected prime counting to a complex function. The Prime Number Theorem (PNT) answers it with striking precision. The number π(x)\pi(x) of primes up to xx is asymptotic to x/log⁡xx/\log x. Even more sharply, it is asymptotic to the logarithmic integral Li⁡(x)\operatorname{Li}(x). The theorem matters far beyond its numerical content because of how it is proved. The first complete proofs were due independently to Hadamard and de la Vallée Poussin in 1896. They discovered a bridge between two things. One is the discrete, chaotic-looking sequence of primes. The other is the smooth analytic behavior of the The Riemann Zeta Function on the line Re⁡(s)=1\operatorname{Re}(s) = 1. This bridge — the zero-free region — turned an arithmetic problem into a problem in complex analysis. It launched the entire field of analytic number theory. The big picture is this: primes, viewed multiplicatively, generate ζ(s)\zeta(s) via the Euler product. The logarithmic derivative of ζ(s)\zeta(s) then encodes prime powers weighted by log⁡p\log p. This happens through the von Mangoldt function Λ(n)\Lambda(n). Poles and zeros of ζ(s)\zeta(s) leave fingerprints — oscillatory terms — in the counting function for Λ\Lambda. Showing that ζ(s)\zeta(s) has no zeros on the line Re⁡(s)=1\operatorname{Re}(s)=1 is key. This is exactly what tames these oscillations enough to force the asymptotic ψ(x)∼x\psi(x)\sim x. From this, π(x)∼x/log⁡x\pi(x)\sim x/\log x follows by elementary manipulation. This article states the Prime Number Theorem precisely. It covers both its elementary form and its refined logarithmic-integral form. It explains the heuristic reasoning that predicts it. It also gives a complete rigorous derivation of the key equivalence. This is the equivalence between the zero-free region and the asymptotic count. It builds on Zeta and the Distribution of Primes and Average Order of Arithmetic Functions. It closes by pointing toward the natural generalization to primes in arithmetic progressions.

Key takeaways
  • π(x)\pi(x), the number of primes ≤x\le x, satisfies π(x)∼x/log⁡x\pi(x) \sim x/\log x as x→∞x \to \infty: the Prime Number Theorem.
  • The sharper and more accurate statement is π(x)∼Li⁡(x)=∫2xdtlog⁡t\pi(x) \sim \operatorname{Li}(x) = \int_2^x \frac{dt}{\log t}, whose error term is much smaller.
  • PNT is equivalent to a zero-free region for ζ(s)\zeta(s): no zeros on the line Re⁡(s)=1\operatorname{Re}(s) = 1.
  • The proof strategy converts π(x)\pi(x) into the Chebyshev function ψ(x)=∑n≤xΛ(n)\psi(x) = \sum_{n\le x}\Lambda(n) via partial summation, then studies ψ(x)\psi(x) through the logarithmic derivative −ζ′/ζ-\zeta'/\zeta.
  • Riemann's explicit formula expresses ψ(x)\psi(x) as xx minus a sum over zeta zeros; each zero off the critical line would introduce large oscillations forbidden by PNT.
  • Key idea: primes thin out like 1/log⁡x1/\log x because the "resonance" of ζ(s)\zeta(s) at s=1s=1 (its simple pole) is undisturbed by any zero on the boundary line Re⁡(s)=1\operatorname{Re}(s)=1.

Where this lives today

The Prime Number Theorem is the prototype for an entire methodology — using analytic properties of a generating (Dirichlet series / zeta-type) function to extract asymptotics for arithmetic counting functions — that recurs throughout mathematics. Its direct generalization to primes in residue classes modulo qq, governed by Dirichlet LL-functions and their own zero-free regions, is the subject foreshadowed by Primes in Arithmetic Progressions: Statement; the same zero-free-region philosophy proves that primes are asymptotically equidistributed among the reduced residues mod qq. In cryptography, heuristic and rigorous estimates on the density of primes of a given bit-length (governed by PNT) underlie key-generation algorithms for RSA and related public-key systems, determining how many candidates one must test before finding a prime. In analytic number theory more broadly, the zero-free region technique generalizes to automorphic LL-functions, the study of primes represented by quadratic forms, and the distribution of zeros related to the Riemann Hypothesis, still the central open problem in the field. In probability and statistics, the heuristic "probability 1/log⁡n1/\log n of primality" underlies the Cramér random model for prime gaps, a widely used (though provably imperfect) model for predicting fine-scale prime statistics. Finally, in computer science, sieve algorithms and primality testing complexity analyses rely on PNT-type density estimates to bound expected running times.

Ask the tutor: How does the same zero-free-region argument adapt to Dirichlet LL-functions to prove primes are equidistributed in arithmetic progressions?

DefinitionPrime counting function, logarithmic integral, and the PNT statement

For real x≥2x \ge 2, define the prime counting function

π(x)=#{p≤x:p prime}.\pi(x) = \#\{p \le x : p \text{ prime}\}.

Define the offset logarithmic integral

Li⁡(x)=∫2xdtlog⁡t.\operatorname{Li}(x) = \int_2^x \frac{dt}{\log t}.

(Some authors use the principal-value integral from 00; the two conventions differ by a constant and do not affect the asymptotics below.) The Prime Number Theorem is the statement

π(x)∼xlog⁡x(x→∞),\pi(x) \sim \frac{x}{\log x} \qquad (x \to \infty),

meaning lim⁡x→∞π(x)/xlog⁡x=1\displaystyle\lim_{x\to\infty} \pi(x)\big/\frac{x}{\log x} = 1. Equivalently and more precisely,

π(x)=Li⁡(x)+O ⁣(x e−clog⁡x)\pi(x) = \operatorname{Li}(x) + O\!\left(x\, e^{-c\sqrt{\log x}}\right)

for some absolute constant c>0c>0, which in particular implies π(x)∼Li⁡(x)\pi(x)\sim \operatorname{Li}(x) and (by a short computation) π(x)∼x/log⁡x\pi(x)\sim x/\log x.

Intuition — prose building the mental picture

Think of the primes as being "selected" from the integers near nn with density roughly 1/log⁡n1/\log n: heuristically, a random integer near nn has about a 1/log⁡n1/\log n chance of being prime, because it must avoid divisibility by all primes up to n\sqrt{n}, and a Mertens-type calculation (see Average Order of Arithmetic Functions) shows the surviving proportion behaves like 1/log⁡n1/\log n. Summing this density from 22 to xx gives exactly Li⁡(x)=∫2xdt/log⁡t\operatorname{Li}(x) = \int_2^x dt/\log t, which is why Li⁡(x)\operatorname{Li}(x), not the cruder x/log⁡xx/\log x, is the "right" approximation — it is the integral of local prime density, while x/log⁡xx/\log x is only its leading term after one integration by parts. The analytic route to this fact goes through the Euler product

ζ(s)=∏p(1−p−s)−1,Re⁡(s)>1,\zeta(s) = \prod_p (1-p^{-s})^{-1}, \qquad \operatorname{Re}(s) > 1,

and its logarithmic derivative

−ζ′(s)ζ(s)=∑n=1∞Λ(n)ns,-\frac{\zeta'(s)}{\zeta(s)} = \sum_{n=1}^\infty \frac{\Lambda(n)}{n^s},

where Λ(n)=log⁡p\Lambda(n) = \log p if n=pkn=p^k is a prime power and 00 otherwise (the von Mangoldt function). The function ζ(s)\zeta(s) has a simple pole at s=1s=1; poles of −ζ′/ζ-\zeta'/\zeta occur exactly at zeros and poles of ζ\zeta, with residue equal to (minus) the order. The pole at s=1s=1 contributes the "main term" xx to ψ(x)=∑n≤xΛ(n)\psi(x) = \sum_{n \le x} \Lambda(n) via a contour-integral (Perron-type) formula, while every zero ρ=β+iγ\rho = \beta+i\gamma of ζ\zeta contributes an oscillating term of size roughly xβ/∣γ∣x^\beta/|\gamma| to ψ(x)\psi(x). If some zero had β=1\beta = 1, its contribution x1/∣γ∣x^1/|\gamma| would be comparable in size to the main term xx itself and would not average out — it would produce a genuine, non-decaying oscillation in ψ(x)/x\psi(x)/x, contradicting ψ(x)∼x\psi(x)\sim x. So PNT can only hold if all zeros satisfy β<1\beta < 1 strictly, i.e. ζ(s)≠0\zeta(s) \ne 0 on the closed line Re⁡(s)=1\operatorname{Re}(s) = 1. This is precisely the content of the classical zero-free region, and it is (as we prove below) not just necessary but equivalent to PNT.

Figure
The critical strip, the zero-free line Re(s)=1, and the pole at s=1
Re(s) Im(s) Re(s)=0 Re(s)=1/2 (critical line) Re(s)=1 : zero-free s=1 : simple pole of ζ(s) nontrivial zeros ρ=β+iγ (known: 0<β<1; RH conjectures β=1/2) σ=0 σ=1/2 σ=1

Central results

TheoremPrime Number Theorem, and its equivalence with the zero-free region

Let ζ(s)\zeta(s) denote the Riemann zeta function, meromorphic on C\mathbb{C} with its only pole a simple pole at s=1s=1 (residue 11), and let Λ(n)\Lambda(n) be the von Mangoldt function. Define

ψ(x)=∑n≤xΛ(n).\psi(x) = \sum_{n\le x} \Lambda(n).

Then the following statements are equivalent, and both are true:

(A) [Prime Number Theorem] π(x)∼xlog⁡x\displaystyle \pi(x) \sim \frac{x}{\log x} as x→∞x \to \infty. Equivalently, ψ(x)∼x\psi(x) \sim x as x→∞x\to\infty.

(B) [Zero-free region on the 1-line] ζ(1+it)≠0\zeta(1+it) \ne 0 for every real tt. Moreover, statement (B) is a true fact about ζ(s)\zeta(s), established independently by Hadamard and de la Vallée Poussin, and hence (A) holds.

LemmaEquivalence of ψ(x)∼x\psi(x)\sim x and π(x)∼x/log⁡x\pi(x) \sim x/\log x

Assume the hypotheses above. Then ψ(x)∼x\psi(x) \sim x if and only if π(x)∼x/log⁡x\pi(x) \sim x/\log x.

Proof

Technique: partial summation (Abel summation), relating ψ\psi, θ(x)=∑p≤xlog⁡p\theta(x)=\sum_{p\le x}\log p, and π(x)\pi(x). Step 1: ψ(x)\psi(x) and θ(x)\theta(x) differ by a lower-order term. Write ψ(x)=∑pk≤xlog⁡p=∑k≥1θ(x1/k)\psi(x) = \sum_{p^k \le x} \log p = \sum_{k \ge 1} \theta(x^{1/k}), where θ(x)=∑p≤xlog⁡p\theta(x) = \sum_{p\le x}\log p, since Λ(pk)=log⁡p\Lambda(p^k)=\log p and the sum over prime powers ≤x\le x groups by exponent kk. For k>log⁡x/log⁡2k > \log x/\log 2 we have x1/k<2x^{1/k} < 2 so θ(x1/k)=0\theta(x^{1/k})=0; hence the sum is finite with at most log⁡2x\log_2 x terms. Each term satisfies θ(x1/k)≤π(x1/k)log⁡x1/k≤x1/klog⁡x\theta(x^{1/k}) \le \pi(x^{1/k})\log x^{1/k} \le x^{1/k}\log x trivially (each of the ≤x1/k\le x^{1/k} primes counted contributes at most log⁡x\log x). For k≥2k\ge 2, x1/k≤x1/2x^{1/k}\le x^{1/2}, so

ψ(x)−θ(x)=∑k≥2θ(x1/k)≤(log⁡2x)⋅x1/2log⁡x=O(x1/2(log⁡x)2).\psi(x) - \theta(x) = \sum_{k\ge 2}\theta(x^{1/k}) \le (\log_2 x)\cdot x^{1/2}\log x = O(x^{1/2}(\log x)^2).

Since this error is o(x)o(x), we get ψ(x)=θ(x)+O(x1/2(log⁡x)2)\psi(x) = \theta(x) + O(x^{1/2}(\log x)^2), so ψ(x)∼x  ⟺  θ(x)∼x\psi(x)\sim x \iff \theta(x) \sim x. Step 2: θ(x)\theta(x) and π(x)\pi(x) are linked by partial summation. We have θ(x)=∑p≤xlog⁡p\theta(x) = \sum_{p \le x} \log p. Apply Abel summation with ap=1a_p = 1 for pp prime (else 00) and f(t)=log⁡tf(t) = \log t:

θ(x)=π(x)log⁡x−∫2xπ(t)t dt.\theta(x) = \pi(x)\log x - \int_2^x \frac{\pi(t)}{t}\, dt.

(This is the standard Abel summation identity ∑n≤xanf(n)=A(x)f(x)−∫1xA(t)f′(t) dt\sum_{n\le x} a_n f(n) = A(x) f(x) - \int_1^x A(t) f'(t)\,dt with A(t)=∑n≤tan=π(t)A(t)=\sum_{n\le t} a_n = \pi(t), f′(t)=1/tf'(t) = 1/t.) Conversely, applying Abel summation with ap=log⁡pa_p = \log p and f(t)=1/log⁡tf(t) = 1/\log t gives

π(x)=θ(x)log⁡x+∫2xθ(t)t(log⁡t)2 dt.\pi(x) = \frac{\theta(x)}{\log x} + \int_2^x \frac{\theta(t)}{t (\log t)^2}\, dt.

Step 3: derive the equivalence. Suppose θ(x)∼x\theta(x) \sim x. Then trivially θ(x)/log⁡x∼x/log⁡x\theta(x)/\log x \sim x/\log x. For the integral term, split at x\sqrt{x}:

∫2xθ(t)t(log⁡t)2 dt=∫2x+∫xx.\int_2^x \frac{\theta(t)}{t(\log t)^2}\,dt = \int_2^{\sqrt x} + \int_{\sqrt x}^x.

The first integral is O(∫2xtt(log⁡t)2dt)O\left(\int_2^{\sqrt x} \frac{t}{t(\log t)^2}dt\right) — using the trivial bound θ(t)=O(t)\theta(t) = O(t) — which is O(x/(log⁡2)2)=O(x)O(\sqrt x/(\log 2)^2) = O(\sqrt x), negligible compared to x/log⁡xx/\log x. For the second, since θ(t)=O(t)\theta(t) = O(t) throughout and log⁡t≥12log⁡x\log t \ge \tfrac12 \log x on [x,x][\sqrt x, x],

∫xxθ(t)t(log⁡t)2dt=O(1(log⁡x)2∫xxdt1⋅θ(t)t).\int_{\sqrt x}^x \frac{\theta(t)}{t(\log t)^2}dt = O\left(\frac{1}{(\log x)^2}\int_{\sqrt x}^x \frac{dt}{1}\cdot\frac{\theta(t)}{t}\right).

More carefully: θ(t)/t=O(1)\theta(t)/t = O(1), so the integrand is O(1/(log⁡t)2)=O(1/(log⁡x)2)O(1/(\log t)^2) = O(1/(\log x)^2) on this range, and the range has length ≤x\le x, giving the bound O(x/(log⁡x)2)O(x/(\log x)^2), which is o(x/log⁡x)o(x/\log x). Hence

π(x)=θ(x)log⁡x(1+o(1))+o ⁣(xlog⁡x)=xlog⁡x(1+o(1)),\pi(x) = \frac{\theta(x)}{\log x}(1+o(1)) + o\!\left(\frac{x}{\log x}\right) = \frac{x}{\log x}(1+o(1)),

i.e. π(x)∼x/log⁡x\pi(x)\sim x/\log x. Conversely, suppose π(x)∼x/log⁡x\pi(x) \sim x/\log x. From Step 2's first formula,

θ(x)=π(x)log⁡x−∫2xπ(t)tdt.\theta(x) = \pi(x)\log x - \int_2^x \frac{\pi(t)}{t}dt.

Since π(t)=O(t/log⁡t)\pi(t) = O(t/\log t), the integrand is O(1/log⁡t)O(1/\log t), and by the same splitting argument as above the integral is O(x/log⁡x)⋅o(1)O(x/\log x) \cdot o(1) more precisely o(x)o(x) (a direct check: ∫2xdt/log⁡t=Li⁡(x)=O(x/log⁡x)\int_2^x dt/\log t = \operatorname{Li}(x) = O(x/\log x), in fact Li⁡(x)∼x/log⁡x\operatorname{Li}(x) \sim x/\log x itself by one integration by parts, so the integral term is asymptotically of the same order x/log⁡xx/\log x as the main term — but crucially it is o(x)o(x)). Since π(x)log⁡x∼x\pi(x)\log x \sim x, and the correction is O(x/log⁡x)=o(x)O(x/\log x) = o(x), we conclude θ(x)∼x\theta(x) \sim x. Combining with Step 1, ψ(x)∼x  ⟺  θ(x)∼x  ⟺  π(x)∼x/log⁡x\psi(x) \sim x \iff \theta(x) \sim x \iff \pi(x) \sim x/\log x. ■\blacksquare

∎

Now we turn to the equivalence between ψ(x)∼x\psi(x) \sim x and the zero-free region, which is the analytic heart of the theorem.

ProofProof that (A)   ⟺  \iff (B)

Technique: Perron-type contour representation of ψ(x)\psi(x) via −ζ′/ζ-\zeta'/\zeta, and analysis of the pole/zero contributions (the explicit formula method); we present the logical structure completely while citing the standard analytic estimates from Zeta and the Distribution of Primes for the contour manipulations. Setup. For Re⁡(s)>1\operatorname{Re}(s) > 1,

−ζ′(s)ζ(s)=∑n=1∞Λ(n)ns.-\frac{\zeta'(s)}{\zeta(s)} = \sum_{n=1}^\infty \frac{\Lambda(n)}{n^s}.

This follows by taking the logarithmic derivative of the Euler product ζ(s)=∏p(1−p−s)−1\zeta(s) = \prod_p (1-p^{-s})^{-1} term by term (justified by locally uniform convergence for Re⁡(s)>1\operatorname{Re}(s)>1):

log⁡ζ(s)=−∑plog⁡(1−p−s)=∑p∑k≥1p−ksk,−ζ′(s)ζ(s)=∑p∑k≥1log⁡p⋅p−ks=∑nΛ(n)ns.\log \zeta(s) = -\sum_p \log(1-p^{-s}) = \sum_p \sum_{k\ge1} \frac{p^{-ks}}{k}, \qquad -\frac{\zeta'(s)}{\zeta(s)} = \sum_p \sum_{k\ge1} \log p \cdot p^{-ks} = \sum_n \frac{\Lambda(n)}{n^s}.

A Perron-type formula (a contour integral converting a Dirichlet series into a partial sum, proved by shifting a vertical line integral and picking up residues, standard in Zeta and the Distribution of Primes) gives, for xx not an integer and c>1c>1,

ψ(x)=12πi∫c−i∞c+i∞(−ζ′(s)ζ(s))xss ds.\psi(x) = \frac{1}{2\pi i}\int_{c-i\infty}^{c+i\infty} \left(-\frac{\zeta'(s)}{\zeta(s)}\right)\frac{x^s}{s}\, ds.

Shifting the contour left past s=1s=1 (a simple pole of −ζ′/ζ-\zeta'/\zeta with residue 11, inherited from the simple pole of ζ\zeta at s=1s=1) and past s=0s=0 (a pole from the factor 1/s1/s, contributing a constant) yields the explicit formula

ψ(x)=x−∑ρxρρ−log⁡(2π)−12log⁡(1−x−2),\psi(x) = x - \sum_{\rho} \frac{x^\rho}{\rho} - \log(2\pi) - \tfrac12\log(1-x^{-2}),

where the sum ranges over the nontrivial zeros ρ=β+iγ\rho = \beta+i\gamma of ζ(s)\zeta(s) (those with 0<β<10 < \beta < 1), interpreted as a symmetric limit over ∣γ∣≤T|\gamma| \le T, T→∞T \to \infty. (The trivial zeros at s=−2,−4,…s=-2,-4,\dots combine with the 1/s1/s pole into the last two terms; we will not need their exact form beyond noting they are O(log⁡x)O(\log x).)

(B⇒AB \Rightarrow A), i.e. zero-free line implies PNT. Suppose ζ(1+it)≠0\zeta(1+it)\ne 0 for all real tt. We must show ∑ρxρ/ρ=o(x)\sum_\rho x^\rho/\rho = o(x). Fix a large parameter TT and split the zero sum at height TT:

∑ρxρρ=∑∣γ∣≤Txρρ+∑∣γ∣>Txρρ.\sum_{\rho} \frac{x^\rho}{\rho} = \sum_{|\gamma|\le T} \frac{x^\rho}{\rho} + \sum_{|\gamma|>T} \frac{x^\rho}{\rho}.

For the tail, using ∣xρ∣=xβ≤x|x^\rho| = x^\beta \le x (since 0<β<10<\beta<1) and the known zero-counting estimate N(T)=#{ρ:∣γ∣≤T}=O(Tlog⁡T)N(T) = \#\{\rho : |\gamma|\le T\} = O(T\log T) (from Zeta and the Distribution of Primes) together with partial summation over 1/∣γ∣1/|\gamma|, one shows

∑∣γ∣>T∣xρρ∣=O ⁣(xlog⁡2TT),\sum_{|\gamma| > T} \left|\frac{x^\rho}{\rho}\right| = O\!\left(\frac{x \log^2 T}{T}\right),

which can be made o(x)o(x) by letting T→∞T \to \infty slowly with xx (concretely, choosing T=T(x)→∞T = T(x) \to \infty). For the head ∣γ∣≤T|\gamma|\le T, the key point is that the zero-free region gives, for each fixed such ρ\rho, β<1\beta < 1 strictly, and in fact quantitatively the classical de la Vallée Poussin zero-free region states there is a constant c0>0c_0>0 such that no zero has

β>1−c0log⁡(∣γ∣+2).\beta > 1 - \frac{c_0}{\log(|\gamma|+2)}.

(This quantitative strengthening of "β<1\beta<1" is what Hadamard–de la Vallée Poussin actually prove, by showing ζ(σ+it)≠0\zeta(\sigma+it) \ne 0 in a region shrinking logarithmically toward the line σ=1\sigma=1 as ∣t∣→∞|t|\to\infty; the qualitative statement (B) is the boundary case tt fixed, σ→1\sigma \to 1.) Using this bound, each term satisfies

xβ=x⋅xβ−1≤xexp⁡(−c0log⁡xlog⁡(∣γ∣+2))≤xexp⁡(−c0log⁡xlog⁡(T+2))x^\beta = x \cdot x^{\beta - 1} \le x \exp\left(-c_0 \frac{\log x}{\log(|\gamma|+2)}\right) \le x\exp\left(-\frac{c_0 \log x}{\log(T+2)}\right)

for ∣γ∣≤T|\gamma| \le T. Choosing T=T(x)=exp⁡(log⁡x)T = T(x) = \exp(\sqrt{\log x}) (say) makes log⁡(T+2)=O(log⁡x)\log(T+2) = O(\sqrt{\log x}), so the exponent −c0log⁡x/log⁡(T+2)-c_0\log x/\log(T+2) behaves like −c0log⁡x→−∞-c_0\sqrt{\log x}\to -\infty, and the bound becomes x⋅e−clog⁡xx \cdot e^{-c\sqrt{\log x}} for a suitable c>0c>0. Since there are O(Tlog⁡T)O(T\log T) zeros with ∣γ∣≤T|\gamma|\le T and 1/∣ρ∣=O(1)1/|\rho| = O(1) for the smallest ones (bounded below away from 00), summing the head contributes

O ⁣(Tlog⁡T⋅xe−clog⁡x),O\!\left(T\log T \cdot x e^{-c\sqrt{\log x}}\right),

and with the above choice of TT this is still o(x)o(x) (indeed x e−c′log⁡xx\,e^{-c'\sqrt{\log x}} for a slightly smaller constant c′c', after absorbing the polynomial-in-log⁡x\log x factor Tlog⁡TT\log T). Combining head and tail,

∑ρxρρ=O ⁣(x e−c′log⁡x)=o(x).\sum_\rho \frac{x^\rho}{\rho} = O\!\left(x\, e^{-c'\sqrt{\log x}}\right) = o(x).

Therefore ψ(x)=x+o(x)\psi(x) = x + o(x), i.e. ψ(x)∼x\psi(x) \sim x, which is (A) (via the Lemma above, equivalent to π(x)∼x/log⁡x\pi(x)\sim x/\log x). This also proves the sharper quantitative form π(x)=Li⁡(x)+O(xe−clog⁡x)\pi(x) = \operatorname{Li}(x) + O(x e^{-c\sqrt{\log x}}) stated in the definition, once one relates Li⁡(x)\operatorname{Li}(x) to ∫2xdt/log⁡t\int_2^x dt/\log t and ψ\psi to π\pi via Step 2 of the Lemma with the quantified error term carried through.

(A⇒BA \Rightarrow B), i.e. PNT implies no zero on the 1-line (necessity of the hypothesis). We argue by contraposition: suppose ζ(1+it0)=0\zeta(1+it_0) = 0 for some real t0≠0t_0 \ne 0 (note t0=0t_0=0 is impossible since ζ\zeta has a pole, not a zero, at s=1s=1). We show ψ(x)∼x\psi(x) \sim x fails, i.e. ψ(x)/x↛1\psi(x)/x \not\to 1. By the functional equation symmetry of zeros (nontrivial zeros come in conjugate pairs ρ,ρˉ\rho, \bar\rho since ζ\zeta has real Taylor coefficients along the real axis, so ζ(s)‾=ζ(sˉ)\overline{\zeta(s)} = \zeta(\bar s)), ζ(1−it0)=0\zeta(1-it_0)=0 as well, giving two zeros ρ=1+it0\rho = 1+it_0 and ρˉ=1−it0\bar\rho = 1 - it_0 both with β=1\beta = 1 exactly. Consider their combined contribution to the explicit formula:

xρρ+xρˉρˉ=x1+it01+it0+x1−it01−it0=2 Re⁡(x1+it01+it0)=2x∣1+it0∣cos⁡(t0log⁡x+ϕ)\frac{x^{\rho}}{\rho} + \frac{x^{\bar\rho}}{\bar\rho} = \frac{x^{1+it_0}}{1+it_0} + \frac{x^{1-it_0}}{1-it_0} = 2\,\operatorname{Re}\left(\frac{x^{1+it_0}}{1+it_0}\right) = \frac{2x}{|1+it_0|}\cos(t_0 \log x + \phi)

for a fixed phase ϕ=−arg⁡(1+it0)\phi = -\arg(1+it_0) (writing 1+it0=∣1+it0∣eiϕ′1+it_0 = |1+it_0|e^{i\phi'} and simplifying; the exact phase is irrelevant to what follows). This quantity has size exactly x⋅2∣1+it0∣∣cos⁡(t0log⁡x+ϕ)∣x \cdot \frac{2}{|1+it_0|}|\cos(t_0\log x+\phi)|, which is a positive constant multiple of xx infinitely often (indeed for a set of xx of positive logarithmic density, since cos⁡(t0log⁡x+ϕ)\cos(t_0 \log x + \phi) oscillates and is bounded away from 00 on intervals of log⁡x\log x of fixed positive length). All other terms in the explicit formula — the remaining zeros with β<1\beta<1 strictly, and the lower-order terms — contribute o(x)o(x) or at worst O(xβ′)O(x^{\beta'}) with β′<1\beta' < 1 for each individual other zero; while summing infinitely many such terms requires the same zero-density estimates as before, the classical zero-free regions established elsewhere still guarantee only finitely many zeros can approach β=1\beta=1 arbitrarily closely for bounded height, and a standard density estimate shows the rest of the sum remains o(x)o(x) compared to the genuine Θ(x)\Theta(x)-sized oscillation exhibited by ρ,ρˉ\rho,\bar\rho themselves. Hence

ψ(x)=x−2x∣1+it0∣cos⁡(t0log⁡x+ϕ)+o(x),\psi(x) = x - \frac{2x}{|1+it_0|}\cos(t_0\log x + \phi) + o(x),

so ψ(x)/x\psi(x)/x does not converge to 11: it oscillates with amplitude bounded away from 00 infinitely often. This contradicts ψ(x)∼x\psi(x)\sim x. Hence PNT (A) forces ζ(1+it)≠0\zeta(1+it)\ne0 for all real t≠0t\ne0, establishing (B). ■\blacksquare

Final remark on truth of (B). The fact that ζ(1+it)≠0\zeta(1+it)\ne 0 for real tt was proved by Hadamard and (independently, with a different method) de la Vallée Poussin in 1896, via the elementary but ingenious trigonometric inequality

3+4cos⁡θ+cos⁡2θ=2(1+cos⁡θ)2≥0,3 + 4\cos\theta + \cos 2\theta = 2(1+\cos\theta)^2 \ge 0,

applied to log⁡∣ζ(σ+it)∣\log|\zeta(\sigma+it)| expansions to show that a hypothetical zero at 1+it01+it_0 together with the pole at σ=1\sigma=1 and the (would-be) zero at 1+2it01+2it_0 (if 2it02it_0 were also a zero location) leads to a sign contradiction in 3log⁡∣ζ(σ)∣+4log⁡∣ζ(σ+it0)∣+log⁡∣ζ(σ+2it0)∣→−∞3\log|\zeta(\sigma)| + 4\log|\zeta(\sigma+it_0)| + \log|\zeta(\sigma+2it_0)| \to -\infty as σ→1+\sigma \to 1^+, contradicting that this quantity must stay bounded below by the Euler product representation for σ>1\sigma > 1 (each individual ∣ζ∣|\zeta|-value there is controlled, and the identity forces non-negativity in the limit if no zero exists, giving the required contradiction). This computation is a self-contained classical result belonging to the study of ζ(s)\zeta(s) itself (see Zeta and the Distribution of Primes), and is not circular with respect to the theorem proved here: it uses only the Euler product for Re⁡(s)>1\operatorname{Re}(s)>1 and continuity/boundedness of ζ\zeta near σ=1\sigma=1, not the Prime Number Theorem. ■\blacksquare

∎

Worked examples

Example 1: Numerically comparing π(x)\pi(x), x/log⁡xx/\log x, and Li⁡(x)\operatorname{Li}(x) at x=106x = 10^6. We use the known exact value π(106)=78,498\pi(10^6) = 78{,}498. Compute x/log⁡xx/\log x at x=106x=10^6: log⁡(106)=6log⁡10≈6×2.302585=13.81551\log(10^6) = 6\log 10 \approx 6 \times 2.302585 = 13.81551. So

10613.81551≈72,382.4.\frac{10^6}{13.81551} \approx 72{,}382.4.

The ratio to the true count is 78498/72382.4≈1.084578498/72382.4 \approx 1.0845, an 8.45%8.45\% overestimate error — the elementary approximation x/log⁡xx/\log x is noticeably crude at this size. Now compute Li⁡(106)\operatorname{Li}(10^6). Using the known tabulated value, Li⁡(106)≈78,627.5\operatorname{Li}(10^6) \approx 78{,}627.5. The ratio is 78498/78627.5≈0.9983578498/78627.5 \approx 0.99835, an error of about 0.16%0.16\% — over fifty times more accurate than x/log⁡xx/\log x at the same xx. This numerically illustrates why Li⁡(x)\operatorname{Li}(x), not x/log⁡xx/\log x, is regarded as the "correct" approximation in the refined PNT, even though both are asymptotically equivalent to π(x)\pi(x) as x→∞x\to\infty (their ratio to each other tends to 11, but their difference from π(x)\pi(x) behaves very differently at finite, even large, xx). Concretely, Li⁡(x)−x/log⁡x∼x/(log⁡x)2→∞\operatorname{Li}(x) - x/\log x \sim x/(\log x)^2 \to \infty, so the two approximations diverge in absolute terms even while agreeing asymptotically in ratio, and empirically Li⁡(x)\operatorname{Li}(x) tracks π(x)\pi(x) far more tightly.

Example 2: Estimating ψ(x)\psi(x) for x=100x = 100 directly from the definition, and comparing to xx. We compute ψ(100)=∑n≤100Λ(n)\psi(100) = \sum_{n\le 100}\Lambda(n) directly. This sum equals ∑k≥1θ(1001/k)\sum_{k\ge1} \theta(100^{1/k}) where θ(y)=∑p≤ylog⁡p\theta(y) = \sum_{p\le y}\log p. Term k=1k=1: θ(100)\theta(100). The primes up to 100100 are:

2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,

a list of 2525 primes (π(100)=25\pi(100)=25). We sum log⁡p\log p for each: log⁡2≈0.6931\log 2\approx0.6931, log⁡3≈1.0986\log3\approx1.0986, log⁡5≈1.6094\log5\approx1.6094, log⁡7≈1.9459\log7\approx1.9459, log⁡11≈2.3979\log11\approx2.3979, log⁡13≈2.5649\log13\approx2.5649, log⁡17≈2.8332\log17\approx2.8332, log⁡19≈2.9444\log19\approx2.9444, log⁡23≈3.1355\log23\approx3.1355, log⁡29≈3.3673\log29\approx3.3673, log⁡31≈3.4340\log31\approx3.4340, log⁡37≈3.6109\log37\approx3.6109, log⁡41≈3.7136\log41\approx3.7136, log⁡43≈3.7612\log43\approx3.7612, log⁡47≈3.8501\log47\approx3.8501, log⁡53≈3.9703\log53\approx3.9703, log⁡59≈4.0775\log59\approx4.0775, log⁡61≈4.1109\log61\approx4.1109, log⁡67≈4.2047\log67\approx4.2047, log⁡71≈4.2627\log71\approx4.2627, log⁡73≈4.2905\log73\approx4.2905, log⁡79≈4.3694\log79\approx4.3694, log⁡83≈4.4188\log83\approx4.4188, log⁡89≈4.4886\log89\approx4.4886, log⁡97≈4.5747\log97\approx4.5747. Summing these 2525 values in order (running total): 0.6931, 1.7917, 3.4011, 5.3470, 7.7449, 10.3098, 13.1430, 16.0874, 19.2229, 22.5902, 26.0242, 29.6351, 33.3487, 37.1099, 40.9600, 44.9303, 49.0078, 53.1187, 57.3234, 61.5861, 65.8766, 70.2460, 74.6648, 79.1534, 83.7281.0.6931,\ 1.7917,\ 3.4011,\ 5.3470,\ 7.7449,\ 10.3098,\ 13.1430,\ 16.0874,\ 19.2229,\ 22.5902,\ 26.0242,\ 29.6351,\ 33.3487,\ 37.1099,\ 40.9600,\ 44.9303,\ 49.0078,\ 53.1187,\ 57.3234,\ 61.5861,\ 65.8766,\ 70.2460,\ 74.6648,\ 79.1534,\ 83.7281. So θ(100)≈83.728\theta(100) \approx 83.728. Term k=2k=2: θ(1001/2)=θ(10)\theta(100^{1/2}) = \theta(10): primes up to 1010 are 2,3,5,72,3,5,7; sum of logs =0.6931+1.0986+1.6094+1.9459=5.3470= 0.6931+1.0986+1.6094+1.9459 = 5.3470. Term k=3k=3: θ(1001/3)=θ(4.6416…)\theta(100^{1/3}) = \theta(4.6416\ldots): primes up to 4.644.64 are 2,32,3; sum =0.6931+1.0986=1.7917=0.6931+1.0986=1.7917. Term k=4k=4: θ(1001/4)=θ(3.1623…)\theta(100^{1/4}) = \theta(3.1623\ldots): primes up to 3.163.16 are 2,32,3; sum =1.7917= 1.7917 again. Term k=5k=5: θ(1001/5)=θ(2.5119…)\theta(100^{1/5}) = \theta(2.5119\ldots): primes up to 2.512.51: just {2}\{2\}; sum =0.6931=0.6931. Term k=6k=6: θ(1001/6)=θ(2.1544…)\theta(100^{1/6}) = \theta(2.1544\ldots): still just {2}\{2\}; sum =0.6931= 0.6931. Term k=7k=7: 1001/7≈1.9307<2100^{1/7} \approx 1.9307 < 2, so θ=0\theta = 0, and all higher kk give 00. Total:

ψ(100)≈83.728+5.347+1.7917+1.7917+0.6931+0.6931=94.044.\psi(100) \approx 83.728 + 5.347 + 1.7917 + 1.7917 + 0.6931 + 0.6931 = 94.044.

Compare to x=100x = 100: the ratio ψ(100)/100≈0.940\psi(100)/100 \approx 0.940, a 6%6\% deficit — consistent with slow convergence of ψ(x)/x→1\psi(x)/x \to 1 (the PNT is an asymptotic statement, and x=100x=100 is far too small for high precision; the error term O(xe−clog⁡x)O(x e^{-c\sqrt{\log x}}) decays extremely slowly since log⁡100≈2.146\sqrt{\log 100} \approx 2.146 is a small exponent). This example shows concretely how ψ(x)\psi(x) is built from prime powers (note the k=2,…,6k=2,\dots,6 terms above all come from prime powers 4,8,16,…,9,27,81,…4,8,16,\dots,9,27,81,\dots etc. contributing log⁡p\log p each time, not log⁡(pk)\log(p^k)), and how far from asymptotic even x=100x=100 still is — underscoring that PNT is a statement about the limit x→∞x\to\infty, not a claim about small-xx accuracy.

CounterexampleWhy "no zero on Re(s)=1" cannot be relaxed to "no zero for Re(s) > 1"

The hypothesis in the Theorem is the zero-free region on the closed line Re⁡(s)=1\operatorname{Re}(s)=1, not merely in the open half-plane Re⁡(s)>1\operatorname{Re}(s)>1. One might think the weaker, "easier" fact — that ζ(s)≠0\zeta(s)\ne0 for Re⁡(s)>1\operatorname{Re}(s)>1 — already suffices for PNT, since after all Re⁡(s)>1\operatorname{Re}(s)>1 is where the Euler product converges and manifestly gives ζ(s)≠0\zeta(s) \ne 0 there (a convergent Euler product of nonzero factors is nonzero). This part is true and easy, but it is not enough. To see why the boundary case is essential, consider what would happen in a hypothetical modification of the situation where ζ\zeta is replaced by a Dirichlet series Z(s)=∑ann−sZ(s) = \sum a_n n^{-s} that has the same Euler-product nonvanishing for Re⁡(s)>1\operatorname{Re}(s)>1 and the same simple pole at s=1s=1, but does have a zero exactly at s=1+it0s = 1+it_0 for some real t0≠0t_0\ne 0 (such objects can be constructed formally as toy models, e.g. by taking Z(s)=ζ(s)⋅s−1−it0s−1−it0⋅g(s)Z(s) = \zeta(s)\cdot\frac{s-1-it_0}{s-1-it_0}\cdot g(s) for a suitable auxiliary gg engineered to introduce a genuine zero on the line while preserving the pole — the point is purely structural, not about the true ζ\zeta). For such a Z(s)Z(s), the explicit-formula argument in the Theorem's proof shows directly that the corresponding "ψZ(x)\psi_Z(x)" would satisfy

ψZ(x)=x−2x∣1+it0∣cos⁡(t0log⁡x+ϕ)+o(x),\psi_Z(x) = x - \frac{2x}{|1+it_0|}\cos(t_0 \log x + \phi) + o(x),

by the exact computation carried out in the (A⇒BA\Rightarrow B) direction above. Since cos⁡(t0log⁡x+ϕ)\cos(t_0\log x+\phi) does not tend to 00 — it oscillates persistently between −1-1 and 11 as x→∞x\to\infty — the ratio ψZ(x)/x\psi_Z(x)/x has lim sup⁡>1\limsup > 1 and lim inf⁡<1\liminf < 1, so ψZ(x)/x\psi_Z(x)/x does not converge, and the analogue of PNT fails outright, even though nonvanishing holds on the entire open half-plane Re⁡(s)>1\operatorname{Re}(s) > 1. This shows precisely why Hadamard and de la Vallée Poussin's contribution was not "zeta has no zeros where the Euler product converges" (trivial) but "zeta has no zeros exactly on the boundary line Re⁡(s)=1\operatorname{Re}(s)=1" — the nontrivial, hard-won extension to the boundary is the entire content needed, and dropping it (retreating to the open half-plane only) genuinely breaks the conclusion.

Scope, edge cases & common traps

SituationWhat holdsWhat can fail / must be checked
π(x)∼x/log⁡x\pi(x) \sim x/\log xTrue (PNT), an asymptotic statement onlySays nothing about the sign or size of π(x)−x/log⁡x\pi(x) - x/\log x; do not read ∼\sim as "≈\approx with small absolute error"
π(x)\pi(x) vs Li⁡(x)\operatorname{Li}(x)Li⁡(x)\operatorname{Li}(x) is empirically far closer to π(x)\pi(x)Li⁡(x)−π(x)\operatorname{Li}(x) - \pi(x) is conjectured (and known for a wide computed range) to be positive, but Littlewood proved it changes sign infinitely often — do not assume Li⁡(x)>π(x)\operatorname{Li}(x) > \pi(x) always
Zero-free regionClassical Hadamard–de la Vallée Poussin region is a shrinking neighborhood of Re⁡(s)=1\operatorname{Re}(s)=1, not the whole strip Re⁡(s)>1/2\operatorname{Re}(s)>1/2The Riemann Hypothesis (still open) would give the much stronger region Re⁡(s)≤1/2\operatorname{Re}(s) \le 1/2; PNT itself needs only the qualitative statement Re⁡(s)=1\operatorname{Re}(s)=1 zero-free
Error term in PNTπ(x)=Li⁡(x)+O(xe−clog⁡x)\pi(x) = \operatorname{Li}(x) + O(xe^{-c\sqrt{\log x}}), classicalThis is much weaker than what RH would give (O(xlog⁡x)O(\sqrt x \log x)); do not conflate the unconditional error term with the RH-conditional one
Elementary (non-analytic) proofsErdős and Selberg (1949) found proofs avoiding complex analysisThese are logically independent but not "easier"; they do not simplify the zero-free-region heuristic explained here

The mathematician behind it

Origins · 1 minJacques Hadamard and how this was discovered
JH
Jacques Hadamard
1865–1963 · French analysis and analytic number theory, École Polytechnique / Collège de France

Jacques Hadamard proved the Prime Number Theorem in 1896 using his own theory of entire functions of finite order, applying it to show ζ(1+it)≠0\zeta(1+it)\ne 0 for real tt. His work on the distribution of zeros of entire functions — developed partly for this very purpose — became foundational to complex analysis generally. Charles-Jean de la Vallée Poussin, working independently and almost simultaneously in Belgium, obtained the same theorem with a sharper error term and the first genuine zero-free region shrinking toward the line Re⁡(s)=1\operatorname{Re}(s)=1, the quantitative refinement used in the proof above.

History
- 1792–1793: Gauss, at about age fifteen, conjectures π(x)≈Li⁡(x)\pi(x) \approx \operatorname{Li}(x) from tables of primes, without proof.
- 1848–1850: Chebyshev proves π(x)/(x/log⁡x)\pi(x)/(x/\log x) is bounded between two explicit positive constants near 11, using elementary combinatorial estimates, without establishing the limit exists.
- 1859: Riemann's memoir introduces ζ(s)\zeta(s) as a function of a complex variable and outlines the explicit formula connecting ψ(x)\psi(x) to zeros of ζ\zeta, without a complete proof of PNT.
- 1896: Hadamard and de la Vallée Poussin, independently, prove ζ(1+it)≠0\zeta(1+it)\ne 0 and deduce the Prime Number Theorem.
- 1949: Erdős and Selberg give an "elementary" proof of PNT avoiding complex analysis, resolving a long-standing question about whether analytic machinery was strictly necessary.
Is the Prime Number Theorem the same as the Riemann Hypothesis?

No. The Prime Number Theorem is a proven theorem (1896), while the Riemann Hypothesis — that all nontrivial zeros of ζ(s)\zeta(s) have real part exactly 1/21/2 — remains unproved. PNT is equivalent only to the weaker fact that ζ(s)\zeta(s) has no zeros on the boundary line Re⁡(s)=1\operatorname{Re}(s)=1. RH would imply a vastly stronger error term in PNT, namely π(x)=Li⁡(x)+O(xlog⁡x)\pi(x) = \operatorname{Li}(x) + O(\sqrt{x}\log x), compared to the much weaker unconditional error O(xe−clog⁡x)O(x e^{-c\sqrt{\log x}}) established without RH. So RH strengthens PNT quantitatively but is not needed for PNT's qualitative truth.

Why is Li⁡(x)\operatorname{Li}(x) a better approximation to π(x)\pi(x) than x/log⁡xx/\log x?

Both satisfy π(x)∼x/log⁡x∼Li⁡(x)\pi(x) \sim x/\log x \sim \operatorname{Li}(x), so they agree in the limiting ratio sense. But integrating 1/log⁡t1/\log t captures the varying local density of primes near each tt, rather than just the density evaluated at the single endpoint xx. One integration by parts shows Li⁡(x)=x/log⁡x+x/(log⁡x)2+⋯\operatorname{Li}(x) = x/\log x + x/(\log x)^2 + \cdots, an asymptotic expansion whose second term already corrects a large chunk of the error that x/log⁡xx/\log x misses; empirically, at x=106x=10^6, Li⁡(x)\operatorname{Li}(x)'s relative error is roughly fifty times smaller than that of x/log⁡xx/\log x.

What exactly is the zero-free region, and why is it hard to prove?

It is a region, typically of the form Re⁡(s)>1−c/log⁡(∣t∣+2)\operatorname{Re}(s) > 1 - c/\log(|t|+2), in which ζ(s)\zeta(s) is guaranteed to have no zeros. Proving even the qualitative boundary case ζ(1+it)≠0\zeta(1+it)\ne 0 requires a delicate trigonometric inequality trick (the 3+4cos⁡θ+cos⁡2θ≥03+4\cos\theta+\cos2\theta \ge 0 identity) applied to the logarithm of the Euler product, because near Re⁡(s)=1\operatorname{Re}(s)=1 the Euler product itself no longer converges, so direct nonvanishing arguments fail; one needs an indirect contradiction argument balancing the pole at s=1s=1 against a hypothetical zero.

Does the Prime Number Theorem tell us about gaps between consecutive primes?

Only indirectly and on average. PNT implies that the average gap between primes near xx is about log⁡x\log x, since the density of primes near xx is roughly 1/log⁡x1/\log x. It says nothing about individual gaps, which can be much larger or much smaller (twin primes, with gap 22, are conjectured to occur infinitely often, unproved in general; large prime gaps growing faster than log⁡x\log x are known to occur). Refined gap results require additional input beyond PNT, such as sieve methods or zero-density estimates for ζ(s)\zeta(s).

Can the Prime Number Theorem be proved without complex analysis?

Yes — Erdős and Selberg found an "elementary" proof in 1949, using only real-variable techniques (an asymptotic Selberg symmetry formula plus Tauberian-type arguments), though it is not simpler in practice than the analytic proof, and it obscures the illuminating connection to zeta zeros. The analytic proof via the zero-free region, as given above, remains the conceptually clearest route and generalizes far more readily, e.g. to primes in arithmetic progressions via Dirichlet LL-functions.

How does the Prime Number Theorem generalize to primes in arithmetic progressions?

Fixing coprime integers aa and qq, one studies primes p≡a(modq)p \equiv a \pmod q using Dirichlet LL-functions L(s,χ)L(s,\chi) for characters χ\chi mod qq, which factor the "restricted" zeta-like sum into a linear combination indexed by χ\chi. An analogous zero-free region for each L(s,χ)L(s,\chi) on Re⁡(s)=1\operatorname{Re}(s)=1 yields the asymptotic π(x;q,a)∼1φ(q)xlog⁡x\pi(x;q,a) \sim \frac{1}{\varphi(q)}\frac{x}{\log x}, showing primes are asymptotically equidistributed among the φ(q)\varphi(q) reduced residue classes — this is the subject of Primes in Arithmetic Progressions: Statement.

Why does the proof need the quantitative zero-free region and not just qualitative nonvanishing on Re(s)=1?

Qualitative nonvanishing at each fixed tt is not, by itself, strong enough to bound the infinite sum over all zeros in the explicit formula uniformly; one needs a bound that shrinks appropriately as ∣γ∣→∞|\gamma|\to\infty to control the tail of the sum and to make the head's contribution genuinely small compared to xx. The classical result of de la Vallée Poussin supplies exactly this quantitative shrinking region, which is what produces the concrete error term O(xe−clog⁡x)O(xe^{-c\sqrt{\log x}}) in the refined Prime Number Theorem.

Before this

Where this leads