Prime Number Theorem Visualizer

π(x) ~ x/ln(x) — explore prime counting, gaps, Ulam spiral, and Riemann zeros

Controls

1,000
168
π(N) actual
145
N/ln(N)
177
Li(N)
Relative error
PNT: π(x) ~ x/ln(x) as x→∞ (Hadamard & de la Vallée-Poussin, 1896).
Li(x) = ∫₂ˣ dt/ln(t) is a better approximation.
RH: If Riemann Hypothesis holds, |π(x)−Li(x)| = O(√x·ln x).

Prime Counting Function π(x)