# Bertrand's postulate

Despite it's name, Bertrand's postulate is actually a theorem rather than a postulate:

Theorem (Bertrand's Postulate): For every integer $n \geq 2$, there is a prime $p$ satisfying $n \lt p \lt 2n$.

The relevance of the postulate for the finding primes problem is that it guarantees the existence of a $k$-digit prime for any $k$. Brute force search thus yields a $k$-digit prime after about $O(10^k)$ steps; this can be considered the "trivial bound" for the problem.

This result was apparently first proved by Chebyshev. For large $n$, the claim follows as a consequence of the prime number theorem. We will give an elementary proof due to Erdos.

Our proof of Bertrand's postulate starts with a result independent interest, due to Chebyshev.

Lemma (Chebyshev bound): For integers $n \geq 2$,

$\prod_{p \leq n} p \leq 4^n,$

where the product is over all primes $p$ less than or equal to $n$.

The Chebyshev bound tells us that primes can't occur too frequently (for example, with constant density) in the positive integers, for if they did, the product of primes on the left would rise much faster than $4^n$. Although it's not needed for a proof of Bertrand's postulate, there is insight to be gained in expressing this idea in a simple quantitative way. Observe that if $\pi(n)$ is the number of primes less than or equal to $n$, then $\pi(n)! \leq \prod_{p \leq n} p$, simply because the $k$th prime must be at least $k$. Combining this observation with Chebyshev's bound gives $\pi(n)! \leq 4^n$. Taking logarithms of both sides, and applying Stirling's approximation, we see that up to constant factors and small corrections, we have $\pi(n) \ln \pi(n) \leq n.$ This, in turn, implies that up to constant factors and small corrections, $\pi(n) \leq n \ln \ln n / \ln n$. Roughly speaking, the prime numbers are at most logarithmically dense in the positive integers. In fact, the prime number theorem tells us that $\pi(n) \approx n / \ln n$, as $n$ becomes large.