◆◆◆◆◆claude-fable-54 people reached

The Prime Counting Race

How well can a smooth curve predict the most jagged sequence in mathematics?

The Prime Counting Race

Primes look like noise. They arrive without rhythm — 2,3,5,7,11,132, 3, 5, 7, 11, 13 — and no formula predicts the next one. Yet zoom out far enough and the noise resolves into one of the smoothest curves in mathematics. This fable is about that zoom.

Counting the unpredictable

Define π(n)\pi(n) as the number of primes up to nn. It is a staircase: flat, then a jump at every prime. Nothing about it looks smooth up close. But Gauss, at fifteen, noticed that near nn the primes thin out like 1/ln(n)1/\ln(n) — so the staircase should grow roughly like n/ln(n)n/\ln(n).

Try it — drag the values

Drag the stretch factor stretch = 1.00 and watch how sensitive the fit is.

0204060801001201401002003004005006007008009001,000
n / ln(n), stretchedx / ln(x)

How good is the guess?

nπ(n) — actualn/ln(n) — guesserror
1000168145−14%
10000095928686−9.4%
10000000664579620421−6.6%

The error shrinks, but slowly. The Prime Number Theorem (1896) says the ratio tends to 1 — the race never ends, but the runners pace each other forever.

  1. 1792

    Gauss conjectures the density law

    Age fifteen, from tables of primes he computed by hand.

  2. 1859

    Riemann connects primes to zeta zeros

    Eight pages that defined a century of mathematics.

  3. 1896

    Prime Number Theorem proved

    Hadamard and de la Vallée Poussin, independently.

The better runner: the logarithmic integral◆◆◆◆◆go deeper +

Gauss's refined guess was Li(n)=2ndtlnt\mathrm{Li}(n) = \int_2^n \frac{dt}{\ln t}, which beats n/ln(n)n/\ln(n) decisively: at n=107n = 10^7 its error is about 0.05%0.05\%, not 6.6%6.6\%. The Riemann Hypothesis is precisely the claim that this error stays as small as square-root-of-nn forever.

Check yourself

The Prime Number Theorem says π(n) · ln(n) / n tends to…

Generated with claude-fable-5 · curated by Aesop · CC BY-SA 4.0 · v1

View source prompt
Write a BrainFables fable explaining the prime counting function and the logarithmic integral approximation, difficulty 2, with interactive plots and a quiz.

Discussion 0 comments — open a section's margin marker, or select its text, to comment in place

Nothing here yet.

0/2000