Skip to main content

Brute force and the primes: what can 17 million lines tell us?

There are 78,498 prime numbers below a million. A mathematical estimate puts the number at about 78,628. That’s only 130 out. But suppose we kept counting to a billion, a trillion and beyond. How far could the estimate drift? That’s the question behind the Riemann hypothesis. What interests me most is what it is about the primes that keeps the error in check.

When mathematician Levent Alpöge and the AI system Claude produced their machine-checked proof, it ran to more than 17 million lines of computer code. Five days later, a team working with Claude proved the same results in just under 113,000 lines, about 150 times shorter. The original wasn’t padded. A later study found that deleting everything unused would have removed less than 3 per cent. Nearly all of it was doing work, and nearly all of it could be replaced. That’s what I mean by brute force. A person has to find a short route, because a person has to carry the argument in their head. A computer that checks every step without tiring never asks for one.

To see how that can happen, I tried brute force on something familiar: Pythagoras’ theorem. We built a proof with 25 terms. Cross out any one and the calculation breaks. Yet the same triangle gave a proof with just two terms, and I could see why in the drawing: two pieces of the longest side fit back together to make the whole. Then we tried a colouring puzzle where, under the rules we set, even the cleverest approach still needed 34 cases. Some brute force hides a simple idea. Some can’t be shortened. A proof that shrinks 150-fold in five days looks like the first kind.

That leaves me with a question for a mathematician or an AI alike. With a pencil and a sheet of paper, what would you show me first? For the triangle, I’d draw those two pieces fitting together. For the primes, I’d want to see why a run of unusually many or few primes can pull the count away from its estimate only so far. We now know that it can’t. Showing someone why would be a discovery in its own right.

Spread the love