Chebyshev's Bounds, Bertrand's Postulate, and Mertens' Theorems
Anchor (Master): Apostol 1976 *Introduction to Analytic Number Theory* Ch. 4 (the elementary prime-counting estimates preceding the analytic PNT); Chebyshev 1852 *J. Math. Pures Appl.* 17 (the original bounds and the first proof of Bertrand's postulate); Erdős 1932 *Acta Litt. Sci. Szeged* 5 (the binomial-coefficient proof of Bertrand); Mertens 1874 *Crelle* 78 (the three theorems); Tenenbaum 2015 *Introduction to Analytic and Probabilistic Number Theory* 3e (Cambridge UP) §I.1-I.3 (Abel summation, Mertens with explicit error terms)
Intuition Beginner
How many primes are there below a million? The answer is , and the striking thing is that it is close to a simple prediction: a million divided by the natural logarithm of a million, which is about . The primes thin out as you climb, but they thin out at a steady, predictable rate. Counting them exactly is hard; bounding how many there are turns out to be much easier, and you can do it with nothing more than careful bookkeeping about factorials.
The trick is to stop counting primes one at a time and instead add up a weight attached to each. Two running totals do the heavy lifting. The first adds the logarithm of every prime up to . The second adds that same logarithm once for the prime, again for its square, again for its cube, and so on. These two totals, written and , grow almost exactly like itself. Pin them between two multiples of and you have pinned the count of primes.
Chebyshev did this in , decades before anyone could prove the exact growth rate. From the same bookkeeping falls a clean fact you can state to a child: between any whole number and its double there is always a prime. And Mertens showed that if you add up one-over-prime for the primes below , the total grows like the logarithm of the logarithm of — slow, but never stopping.
Visual Beginner
A staircase plot of the function climbing from left to right, jumping upward at each prime power. At it jumps by ; at by ; at (which is squared) by again; at by . Two straight dashed lines, one of slope a little below and one a little above , sandwich the staircase: the whole climb stays trapped between them. Beside it, a short table shows how close and stay as grows.
| (approx.) | ||
|---|---|---|
The staircase never wanders far from the diagonal line . That single picture is the whole content of Chebyshev's bounds: is squeezed between a fixed fraction of and a fixed multiple of , so the primes can be neither far too dense nor far too sparse.
Worked example Beginner
Check the squeeze directly for a small value, and watch Bertrand's postulate fall out.
Step 1. Compute by listing the prime powers up to . They are (powers of ), (powers of ), , and . Each contributes the logarithm of its underlying prime: each add ; each add ; adds ; adds . So $$ \psi(10) = 3\log 2 + 2\log 3 + \log 5 + \log 7 = \log!\big(2^3 \cdot 3^2 \cdot 5 \cdot 7\big) = \log 2520 \approx 7.83. $$
Step 2. Compare with . The ratio is , comfortably between, say, and . The squeeze holds.
Step 3. Read off Bertrand for : is there a prime between and ? Yes — the number . The bookkeeping behind the squeeze, sharpened, guarantees such a prime exists for every , with no gaps allowed.
What this tells us: is just the logarithm of the product of all prime powers up to , and that product grows at a rate locked to . Bounding a product of primes — something factorials make easy — bounds the primes themselves.
Check your understanding Beginner
Formal definition Intermediate+
Throughout, ranges over primes, is the natural logarithm, and is the von Mangoldt function of 21.11.01: if for a prime and integer , and otherwise. We follow Apostol [Apostol Ch. 4].
Definition (Chebyshev functions). For real , the Chebyshev theta function and Chebyshev psi function are $$ \vartheta(x) = \sum_{p \leq x} \log p, \qquad \psi(x) = \sum_{n \leq x} \Lambda(n) = \sum_{p^m \leq x} \log p = \sum_{m \geq 1} \vartheta!\big(x^{1/m}\big). $$ The last equality holds because contributes to exactly when , i.e. ; collecting the contribution at fixed exponent gives , and the sum over is finite since once , that is once .
Definition (prime-counting function). As in 21.01.02, .
Definition (asymptotic relations). Write for , and for the existence of constants with for all large . The average order of an arithmetic function refers to the asymptotics of the summatory function .
The three functions are linked at the level of size. Since for , summing gives . The reverse comparison, restricting to primes in , shows . The two Chebyshev functions differ by a lower-order amount: , because and only terms are nonzero. Hence , and likewise with replaced by .
Counterexamples to common slips
- " and are the same function." They differ by the prime-power tail . At , while ; the gap comes from the powers . The gap is , negligible against the main term but not zero.
- " is an elementary theorem." The asymptotic equivalence with constant is the prime number theorem, which the elementary Chebyshev method does not deliver — it gives only the two-sided bound . The step from to requires either complex analysis (Hadamard-de la Vallée Poussin) or the Selberg-Erdős elementary argument, both deferred to
21.12.01. - " converges because primes are sparse." It diverges, by Mertens' second theorem, at rate . Sparsity bounds the count but not the reciprocal sum; the harmonic weighting decays slowly enough that the divergence survives.
Key theorem with proof Intermediate+
The signature theorem is Chebyshev's two-sided bound, proved by the elementary method: extract from the prime factorisation of factorials, with no appeal to or complex analysis.
Theorem (Chebyshev's bounds). There exist absolute constants such that for all sufficiently large , $$ c_1, x ;\leq; \psi(x) ;\leq; c_2, x. $$ One may take and . Equivalently and .
Proof. The engine is the identity, valid for every integer ,
$$
\log N! = \sum_{n \leq N} \Lambda(n) \left\lfloor \frac{N}{n} \right\rfloor,
$$
which holds because (using from 21.11.01), and reindexing the divisor sum by counts, for each , the multiples , of which there are .
Upper bound. Consider the central binomial coefficient . Its logarithm is $$ \log \binom{2N}{N} = \log(2N)! - 2\log N! = \sum_{n \leq 2N}\Lambda(n)\left(\left\lfloor \frac{2N}{n}\right\rfloor - 2\left\lfloor \frac{N}{n}\right\rfloor\right). $$ Each bracket equals or , so every term is at most , and the bracket vanishes for (outside the summation range). Hence $$ \log\binom{2N}{N} ;\leq; \sum_{n \leq 2N}\Lambda(n) = \psi(2N). $$ On the other hand is the largest of the terms summing to , so , giving . Combining, , which is the lower bound at even arguments; we return to it below. For the upper bound we instead use that the bracket is for (there , ), so those terms alone contribute plus prime-power corrections; summing the telescoping inequality over from a dyadic decomposition yields for all . Since , also for large .
Lower bound. From established above, and nondecreasing, every satisfies for large . This gives the lower bound. Together, . The transfer to and to uses the size comparisons of the Formal definition.
Bridge. Chebyshev's bounds build toward 21.12.01 the prime number theorem, where the same factorial identity reappears as the elementary input to the Selberg symmetry formula, and this is exactly the elementary shadow of the analytic statement that the contour integral of delivers; the bounds appear again in 21.11.04 Perron's formula as the convergence estimates that make the truncated contour integral controllable. The central insight is that is recoverable from factorials because in the convolution ring of 21.11.01, so divisor-sum identities convert directly into prime-counting estimates. Putting these together, the bound generalises into the precise once one knows , the bridge being the Mertens estimate proved next, which is dual to the average order .
Exercises Intermediate+
Lean formalization Intermediate+
Mathlib carries the von Mangoldt function and a formalised Bertrand's postulate, so the central statements of this unit are expressible. The companion notes record the load-bearing declarations against Mathlib.NumberTheory.VonMangoldt and Mathlib.NumberTheory.Bertrand.
-- Operative imports: Mathlib.NumberTheory.VonMangoldt,
-- Mathlib.NumberTheory.Bertrand, Mathlib.Analysis.SpecialFunctions.Log.Basic
import Mathlib.NumberTheory.VonMangoldt
import Mathlib.NumberTheory.Bertrand
open ArithmeticFunction
-- The von Mangoldt function Λ; ψ(x) = ∑_{n ≤ x} Λ(n) is its summatory function.
#check (vonMangoldt : ArithmeticFunction ℝ)
#check @ArithmeticFunction.vonMangoldt_apply
-- vonMangoldt n = if IsPrimePow n then Real.log (minFac n) else 0
-- Λ * ζ = log : the identity log = Λ * 𝟙 driving the factorial identity
-- log N! = ∑_{n ≤ N} Λ(n) ⌊N/n⌋.
#check @ArithmeticFunction.vonMangoldt_mul_zeta
-- vonMangoldt * ↑ζ = log
-- Bertrand's postulate, formalised (Erdős proof, via the central binomial bound):
#check @Nat.bertrand
-- Nat.bertrand : ∀ (n : ℕ), n ≠ 0 → ∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
-- The central-binomial lower bound 4^n/(2n+1) ≤ C(2n, n), the engine of both
-- Chebyshev's lower bound and Erdős's Bertrand proof:
#check @Nat.four_pow_lt_mul_centralBinom
#check @Nat.centralBinomThe gap documented in the unit metadata's Mathlib gap analysis is not the absence of or of Bertrand — Mathlib has both — but the absence of a single module proving the two-sided Chebyshev bound from the factorial identity, the equivalence , and the three Mertens theorems with the constants and , end to end and in one place.
Advanced results Master
Theorem 1 (the equivalence of the three asymptotic forms). The relations , , and are equivalent [Apostol Ch. 4]. The first two are equivalent because . The equivalence with follows from Abel summation in both directions: , so forces , and conversely recovers from . This equivalence reduces the prime number theorem to the single analytic statement , which is the form the contour method of 21.12.01 proves.
Theorem 2 (Chebyshev's explicit constants). Chebyshev 1852 [Chebyshev 1852] obtained the sharper bounds for large , with , by combining the factorial identity at the four arguments into the linear form , whose coefficients are chosen so the associated combination of telescopes. These constants straddle — Chebyshev's method cannot bring them together — which is exactly why (constant exactly ) lies beyond the elementary range and required the analytic methods of 21.12.01.
Theorem 3 (Bertrand's postulate; Chebyshev 1852, Erdős 1932). For every integer there is a prime in [Chebyshev 1852] [Erdős 1932]. Chebyshev deduced it from his lower bound on ; Erdős's elementary proof (Exercise 7) reads the postulate off the prime factorisation of , using , the vanishing of for , the prime-power cap , and the primorial bound . The same machinery yields the refinement that for any there is a prime in for all large , since the Chebyshev band has multiplicative width below .
Theorem 4 (Mertens' three theorems; Mertens 1874). With the Euler-Mascheroni constant and the Meissel-Mertens constant [Mertens 1874], $$ \sum_{p \leq x}\frac{\log p}{p} = \log x + O(1), \quad \sum_{p \leq x}\frac1p = \log\log x + M + O!\Big(\frac{1}{\log x}\Big), \quad \prod_{p \leq x}\Big(1 - \frac1p\Big)^{-1} \sim e^{\gamma}\log x. $$ The first is proved (Exercise 5) from and ; the second from the first by Abel summation (Exercise 6); the third from the second by expanding the logarithm of the product (Exercise 8). All three use only Chebyshev-grade input — no PNT, no zeta zeros. The product form is the prime-product backbone of sieve theory: the heuristic "probability that survives sieving by all " is , and the factor is the source of the celebrated parity-barrier constant in the linear sieve.
Theorem 5 (Shapiro's Tauberian theorem). Apostol's Theorem 4.8 [Apostol Ch. 4]: if are nonnegative and , then , and moreover . Applied to it produces Mertens I and the Chebyshev order in one stroke from the factorial identity, abstracting the elementary core of this unit. Shapiro's theorem is the precise statement of how an average-order estimate against upgrades to a -weighted estimate, the recurring move from 21.11.01 average orders to prime counting.
Synthesis. The elementary prime-counting estimates are the foundational reason the prime number theorem is plausible before it is provable: Chebyshev's already locates within a constant factor of , and this is exactly the bridge from the convolution identity of 21.11.01 to the analytic of 21.12.01. The central insight is that all of this content is squeezed out of one identity, , by elementary manipulation of factorials and binomial coefficients; the factorial encodes the multiplicative structure of the integers, and differencing it (as in ) isolates the primes. Putting these together, Mertens' theorems are dual to the average-order estimates of 21.11.01: where measures divisors, measures primes, and both descend from partial summation against a Dirichlet-convolution identity. The pattern generalises: Shapiro's Tauberian theorem is the abstract engine, the Selberg symmetry formula is its second-order refinement, and the elementary proof of the full PNT in 21.12.01 is what one obtains by pushing this differencing one level deeper. The bridge is everywhere the factorial identity; Chebyshev saw it, Mertens summed against it, Erdős differenced it, and the analytic theory only sharpens the constant from to .
Full proof set Master
Proposition 1 (factorial identity). For every integer , .
Proof. From in the convolution ring of 21.11.01, for each we have . Summing over ,
$$
\log N! = \sum_{m \leq N}\log m = \sum_{m \leq N}\sum_{d \mid m}\Lambda(d) = \sum_{d \leq N}\Lambda(d),#{m \leq N : d \mid m} = \sum_{d \leq N}\Lambda(d)\left\lfloor \frac{N}{d}\right\rfloor,
$$
where the third equality swaps the order of summation, grouping by the divisor , and the count of multiples of up to is .
Proposition 2 (Abel/partial summation). Let be complex, , and continuously differentiable on . Then $$ \sum_{n \leq x}a_n g(n) = A(x)g(x) - \int_1^x A(t)g'(t),dt. $$
Proof. Write and sum by parts over : $$ \sum_{n \leq x}a_n g(n) = \sum_{n}(A(n) - A(n-1))g(n) = A(\lfloor x\rfloor)g(\lfloor x\rfloor) - \sum_{n \leq \lfloor x\rfloor - 1}A(n)(g(n+1) - g(n)). $$ Since is constant on , , and because there. Assembling the integrals over yields the stated formula.
Proposition 3 (the prime-power tail is bounded). converges; hence has the bound and the reciprocal tail .
Proof. For fixed , , so , which converges by comparison with . For the unweighted difference, ; the term contributes , and the remaining terms total , with at most nonzero terms. Hence the difference is .
Proposition 4 (lower bound on refines Bertrand). For all large , for an absolute constant ; in particular contains primes, a quantitative Bertrand.
Proof. From , it suffices to bound below by . The central binomial gives , and the only primes contributing with exponent forcing a lower bound lie in together with prime-power corrections of size ; isolating them, . Thus , whence . The strict positivity for every (not merely large ) is Bertrand's postulate, with small cases checked directly.
Connections Master
The factorial identity and the von Mangoldt function used throughout are the convolution identity of
21.11.01; the entire Chebyshev method is partial summation against that single Dirichlet-convolution relation, and the average-order machinery (hyperbola method, ) developed there is the divisor-counting analogue of the prime-counting estimates here.These elementary bounds are the prelude to
21.12.01the prime number theorem: Chebyshev's is sharpened to by the contour integral of , and the factorial identity reappears in the Selberg symmetry formula underlying the elementary (complex-analysis-free) PNT proof.The convergence estimate supplies the absolute-convergence and truncation control needed in
21.11.04Perron's formula and Mellin inversion, where the summatory function of a Dirichlet series is recovered by a vertical contour integral whose error term is governed by Chebyshev-grade bounds on the coefficients.The primes counted here index the Euler product of
21.03.01the Riemann zeta function; Mertens' third theorem is the partial Euler product at , and the divergence rate of is the elementary trace of the pole of at .The infinitude and fundamental-theorem apparatus of
21.01.02is the substrate: the factorisation of that powers Bertrand, and the unique-factorisation count behind , both rest on the prime factorisation theory established there.
Historical & philosophical context Master
Pafnuty Chebyshev's 1852 memoir Sur les nombres premiers [Chebyshev 1852] gave the first rigorous control on the density of primes, three decades after Legendre and Gauss had conjectured from numerical tables. Chebyshev introduced the functions now bearing his name and proved for large , together with the first proof of the conjecture that Joseph Bertrand had stated in 1845 and verified by hand to three million. Chebyshev's method was entirely elementary, resting on the arithmetic of factorials, and it established the order of while leaving the exact constant out of reach.
Franz Mertens's 1874 paper in Crelle's journal [Mertens 1874] sharpened the elementary theory into the three asymptotic identities for , , and , isolating the constants and . Mertens's second theorem made precise Euler's 1737 observation that diverges, pinning the rate at . The young Paul Erdős, in his 1932 debut paper [Erdős 1932], recast Bertrand's postulate as a transparent estimate on the prime factorisation of the central binomial coefficient, a proof so clean it became the canonical one. The gap between the Chebyshev band and the true constant stood until 1896, when Hadamard and de la Vallée Poussin proved using the complex analysis of ; the elementary route to the same limit was found by Selberg and Erdős in 1948-49.
Bibliography Master
@article{chebyshev1852,
author = {Chebyshev, Pafnuty L.},
title = {M\'{e}moire sur les nombres premiers},
journal = {Journal de Math\'{e}matiques Pures et Appliqu\'{e}es},
volume = {17},
pages = {366--390},
year = {1852}
}
@article{erdos1932bertrand,
author = {Erd\H{o}s, Paul},
title = {Beweis eines Satzes von Tschebyschef},
journal = {Acta Litterarum ac Scientiarum (Szeged)},
volume = {5},
pages = {194--198},
year = {1932}
}
@article{mertens1874,
author = {Mertens, Franz},
title = {Ein Beitrag zur analytischen Zahlentheorie},
journal = {Journal f\"{u}r die reine und angewandte Mathematik (Crelle)},
volume = {78},
pages = {46--62},
year = {1874}
}
@book{apostol1976ant,
author = {Apostol, Tom M.},
title = {Introduction to Analytic Number Theory},
series = {Undergraduate Texts in Mathematics},
publisher = {Springer-Verlag},
year = {1976},
note = {Chapter 4: Chebyshev functions, Bertrand, Mertens, Shapiro}
}
@book{tenenbaum2015,
author = {Tenenbaum, G\'{e}rald},
title = {Introduction to Analytic and Probabilistic Number Theory},
edition = {3},
series = {Graduate Studies in Mathematics},
volume = {163},
publisher = {American Mathematical Society},
year = {2015}
}
@book{hardywright2008,
author = {Hardy, G. H. and Wright, E. M.},
title = {An Introduction to the Theory of Numbers},
edition = {6},
publisher = {Oxford University Press},
year = {2008},
note = {Revised by D. R. Heath-Brown and J. H. Silverman; Chapter XXII}
}