Prime Number Theorem — Definition, Formula & Examples
The Prime Number Theorem states that the number of primes less than or equal to a large number is approximately . In other words, primes thin out gradually, and this formula captures their average density with increasing accuracy as grows.
Let denote the prime-counting function, which gives the number of primes . The Prime Number Theorem asserts that , meaning . Independently proved by Hadamard and de la Vallée-Poussin in 1896, the theorem relies on properties of the Riemann zeta function.
Key Formula
Where:
- = The number of prime numbers less than or equal to x
- = A positive real number
- = The natural logarithm of x
- = Asymptotic equivalence: the ratio of the two sides tends to 1 as x → ∞
How It Works
The theorem does not tell you exactly how many primes exist below ; it provides an asymptotic estimate. As increases, the ratio of the true count to the approximation approaches 1. A sharper approximation uses the logarithmic integral , which typically outperforms for finite values. The theorem also implies that the probability a randomly chosen integer near is prime is roughly .
Worked Example
Problem: Estimate the number of primes less than or equal to 1,000,000 using the Prime Number Theorem, and compare with the true value.
Step 1: Compute the natural logarithm of 1,000,000.
Step 2: Apply the approximation formula.
Step 3: Compare with the exact count. The true value is π(1,000,000) = 78,498. The estimate undershoots by about 7.8%, which is typical — the approximation improves for larger x.
Answer: The Prime Number Theorem estimates about 72,382 primes up to one million, compared to the exact count of 78,498.
Why It Matters
The Prime Number Theorem is foundational in analytic number theory and directly influences the design of RSA encryption, where generating large primes depends on knowing how densely primes occur. It also motivates deeper conjectures like the Riemann Hypothesis, which would sharpen the error term in the prime-counting estimate.
Common Mistakes
Mistake: Treating the theorem as an exact formula rather than an asymptotic one.
Correction: The symbol ~ means the ratio π(x) / (x/ln x) → 1 as x → ∞. For any finite x, there will be a nonzero error. The theorem guarantees the relative error vanishes, not the absolute error.
