The primes come without a pattern anyone can use: 2, 3, 5, 7, 11, 13, and then gaps of every size, for ever. In 1859 Bernhard Riemann found that their arrangement is a sum of waves, and that the waves have exact pitches. This room finds the pitches, adds up the waves, and the primes come out.
For the curious kid.
Walk along the number line and climb a step every time you reach a prime: a number that nothing divides except 1 and itself. That is the blue staircase. Two details make it tidy. The steps grow slowly taller, so that the step at 2 has height 0.69 and the step at 97 has height 4.57 (each is the natural logarithm of its prime). And a power of a prime, such as 4, 8 or 9, gets a step as well, the same height as its prime's. Built this way, the staircase climbs one up for every one along, on average. The blue staircase was made the ordinary way, by finding the primes first.
The gold curve was not. With the slider at none it is a plain slope, the average of the staircase. It knows how many primes to expect and nothing about where they are. Now add one wave. The slope gets a slow wobble, and each swing of the wobble is 1.56 times as long as the swing before. Add a second wave, with a quicker wobble, and a third. The wobbles lean on each other. By ten waves there are lumps at 2, 3 and 5. By a hundred the small primes have steps with flat treads. By a thousand the gold curve follows the staircase all the way to a hundred. Nothing in the gold curve ever checked whether a number was prime.
The waves come from the strip at the top. It shows one function, called zeta, followed along one particular line. Wherever it crosses zero there is a note: 14.13, then 21.02, then 25.01, and so on without end, crowding closer as they go. Each note is one wave, and the note's number says how fast the wave wobbles. This page did not look the notes up. It found the first thousand itself when you opened it, by walking along the line and watching for the curve to change sign.
The lowest chart adds the same waves again with every wave equally loud. They cancel each other almost everywhere. At the primes, and at the powers of primes, they all rise together and pile up. Press Listen to hear that chart played from left to right: the higher the pile, the louder the sound. It ticks at 2, 3, 5, 7, 11, 13, and more softly at 4, 8 and 9.
Deeper.
The staircase is Chebyshev's function ψ(x): the sum of ln p over every prime power pk up to x. Riemann's idea, proved in this form by Hans von Mangoldt in 1895, is an exact formula for it: ψ(x) = x − Σ xρ/ρ − ln 2π − ½ ln(1 − x−2), where the sum runs over the zeros ρ of the zeta function in the strip where they are not obvious. Each zero ½ + iγ, taken with its mirror image ½ − iγ, contributes 2√x · cos(γ ln x − φ)/|ρ|. That is a wave that is regular in ln x, which is why each swing is longer than the last by a fixed factor. It grows like √x. And it is divided by |ρ|, so the low notes are the loud ones: the first wave has size 0.14 √x and the thousandth 0.0014 √x.
The sum over all the zeros converges, slowly, and only if they are added in order of height. With N of them the curve cannot separate numbers closer than about 2πx divided by the highest note. For a thousand notes that is 0.13 at x = 30 and 0.44 at x = 100, enough to tell 101 from 103. Exactly at a step the gold curve passes through the middle of the riser, and just after it overshoots by 9% of the riser's height, as any sum of waves must at a jump. Halfway between whole numbers, a thousand waves miss the staircase by about 0.05, typically, all the way to 100.
Every wave here has the size √x because every zero this page found has real part exactly ½. A zero off that line would give a wave that grows like a higher power of x, a note that in the end drowns out all the others. The Riemann hypothesis says there is no such zero. It is the same as saying the staircase never strays from the slope by much more than √x. The first ten trillion zeros have been checked and every one is on the line. Nobody has proved that all the others are.
To find zeros the page turns zeta, on the line, by an angle θ(t) that makes it a real number, Z(t). A zero is then a change of sign. It walks up the line in steps of a twentieth using a quick formula, good to about a hundredth, that Carl Siegel found in 1932 among the notes Riemann left unpublished. At each change of sign it closes in with a slow and exact sum. A separate law that uses no zeros says how many there should be below any height, and the page's count agrees with it between every pair of neighbours, so none was skipped. All thousand match the published tables to nine decimals. Around height t there are ln(t/2π)/2π notes per unit, so they crowd together, slowly.
The lowest chart is a theorem of Edmund Landau from 1911. Add xρ over the zeros up to height T with no weights at all, and the sum is −(T/2π) ln p when x is a power of the prime p, and small otherwise. The chart divides by that factor, so each pile should reach ln p: the dots. A power piles as high as its prime, so the piles at 2, 4, 8 and 16 are all the same height. With a thousand notes the piles are sharp to about 30 and blur beyond 60, where neighbouring whole numbers are too close for these notes to separate.
One afternoon in 1972 Hugh Montgomery, who had just worked out how the notes are spaced, was introduced over tea at Princeton to a physicist. He mentioned his formula. The physicist recognised it at once, from a subject that has nothing to do with primes. Type the physicist's surname and this room will check his remark.
The primes look like noise. They are a chord.