π Lanningham

Riemann Hypothesis 1

• 11 min read •

Introduction

Recently, Levent Alpöge, a researcher using Claude, claimed to have solved the Riemann Hypothesis, one of the 7 Millennium Prize Problems. The Riemann Hypothesis is widely considered one of the crowning mysteries of the branch of mathematics known as number theory.

By the end of this series of blog posts, I want to build up, together, some understanding of the Riemann Hypothesis, how it was solved, and what the hell this visualization means:

0 50 100 0 ½ 1ζ(s) = 0 2, 3, 5, 7, 11, 13, … 0 5 10 151020304050
↔ drag a zero

The 7 Millennium Prize Problems were chosen around the turn of the millennium as the problems most likely to represent gaps in our understanding, not just in their answers, but in the tools needed to solve them. For example, the only one officially solved as I write this is the Poincaré Conjecture, and its proof in 2003 refined the concept of Hamilton’s Ricci flow. This tool, beyond solving the Poincaré Conjecture, has been massively useful in understanding other geometric problems.

Thus, the fact that the Riemann Hypothesis, which pertains to the spacing and frequency of primes, has long stood unanswered suggested that there was some powerful number-theoretic tool that would unlock huge new insights in other areas of mathematics, such as cryptanalysis (which relies heavily on primes).

It is the ultimate irony, then, that Alpöge’s proof is little more than an opaque, 17-million-line ball of inscrutable symbols in a language known as Lean, which can be machine-checked, but is difficult to read. In its initial form, there’s little hope of any human fully understanding the core insight that led to the breakthrough. Luckily, the reality is that many smart people, some with the help of AI, have started the process of cleaning up the code and digesting the core proofs. Alpöge’s discovery, his familiarity with the subject, and his ability to work with large language models to make such progress are impressive and important. But the efforts to further digest that proof and make it palatable to humans, such that we can continue that engine of insight and understanding, are where the true mathematics of the modern era is happening, in my opinion.

I’ve long thought the Riemann Hypothesis, if I were to live to see it solved, would be the single greatest achievement of mathematics in my lifetime. I tell people I’m a mathematician by passion, not by trade. While I have an above-average understanding of, and interest in, mathematics, the true professional number theorists operate in stratospheres that are just as far above my head as anyone else’s. My interest in mathematics means I may have climbed a tree to poke my head above the canopy compared to someone without that understanding, but the Riemann Hypothesis and its proof are in low Earth orbit.

Still, given the historical significance of this result, I felt a strong desire to come to understand it with at least some depth. And, given that I often like explaining things, and people seem to like reading or listening to my explanations, I figured I would (slowly) document my process as I work to digest this proof, with the help of AI.

In this first part, I will try to leave you with an intuitive understanding of what the Riemann Hypothesis was even trying to prove: how regular or irregular are the prime numbers?

For this part, my hope is that you need no greater mathematics background than an understanding of numbers, multiplication, and some basic algebra. That being said, if you’re particularly anti-mathematical, it will likely require some patience and revisiting to absorb some of the concepts. My hope is that, if you’re patient, I can help you digest this in the same way that I am.

(I cannot promise the same approachability for later parts, unfortunately!)

Finally, a disclaimer for the true stratospheric mathematicians who might read this: My goal is intuition over precision. I’ve tried to get all the details right, but there might be caveats, exceptions, typos, etc. that grind your gears. But hopefully none of them undermine the core intuition. The audience for this blog post is people who would otherwise have no conceivable frame of reference for the Riemann Hypothesis, not you. :)

What even are prime numbers?

Mathematicians are always discussing primes, and how “random” they are. But that is a bit misleading. They’re not random at all.

Imagine a number line, with the numbers from 2 on up to infinity. Some of these numbers can be constructed by multiplying smaller numbers, and some of them can’t. This is interesting to us as mathematicians because knowing those factors can make some things easier. There are cases where facts about a number can be more easily proven through its factors. For example, if a number can be factored into some combination of 2s and 5s, we can prove that its reciprocal has a terminating decimal (18=0.125\frac{1}{8} = 0.125, but 16=0.1666…\frac{1}{6} = 0.1666\ldots). From the other direction, one of the most widely used cryptography schemes is built on the fact that finding factors of large numbers is hard, and knowing the two unique large factors of another much larger number can provide a “trapdoor” to decrypt a message.

But not every number can be broken down this way. Some numbers are the “fundamental building blocks”, so to speak, and you can figure out what these numbers are yourself with a little physical analogy.

Imagine writing the numbers from 2 up to as high as you like on a piece of paper. (We exclude 1 because every number is a multiple of 1, and the field would be pretty boring and end here. Mathematics is often about finding what choices lead to more interesting questions.)

Take the first number in your list, in this case 2. Now, imagine taking a hole punch and punching out every multiple of 2, excluding 2 itself: 4, 6, 8, 10, and so on. Click on the number 2 below to see this.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

What’s left behind is every number that can’t be divided by two: every odd number.

Then, take the next number still on your list, in this case 3. Punch out every number that is a multiple of 3. Some will already be punched out (like 6, which was already a multiple of 2), but you will certainly punch out new ones.

The next number on your list is 5 (4 was punched out already as a multiple of 2). Then 7. Then 11 (skipping 9). And so on, through every number.

The numbers that survive are exactly those building blocks: every number that was knocked out is built up out of the numbers that survive. These are what we call prime numbers. They’re not “random” in the same way a dice throw is. We know exactly how to define them and where to find them: they are the numbers that survive all the hole punching before them. (This process is called the Sieve of Eratosthenes, after the Greek mathematician who described it over 2,000 years ago.)

However, for something produced by such a regular process, the primes behave quite erratically. They bunch up (there are likely infinitely many pairs of primes that differ by just two, a claim that remains tantalizingly unproven) and spread out (for any number you can pick, somewhere there is a gap between two consecutive primes that is at least that large, an easily proven fact). We have no known practical formula for calculating “the next” prime, beyond just cleverly testing numbers to see if they are prime, nor is there a simple formula for how many primes there are between two numbers.

This seeming contradiction is why mathematicians find the study of primes so fascinating.

How common are prime numbers?

One question we might ask to start to understand the prime numbers is: how many of them are there?

Could there be some unimaginably huge but finite number of them? Maybe once you list out enough primes, all of the remaining holes are punched and you’re done.

Let’s suppose that is true, and you have the list: p1,p2,…,pnp_1, p_2, \ldots, p_n.

Now imagine you multiply them all together, and call this CC:

C=p1×p2×p3×⋯×pnC = p_1 \times p_2 \times p_3 \times \cdots \times p_n

And then, you add one to CC and call this PP:

P=C+1P = C + 1
  • PP certainly isn’t divisible by 2: 2 is prime, CC was the product of all primes, and so the next even number is C+2C + 2.
  • PP also isn’t divisible by 3: 3 is prime, CC was the product of all primes, and so the next number divisible by 3 is C+3C + 3.
  • PP also isn’t divisible by 4, or it would have been divisible by 2.
  • And so on, for every prime on your list.

Therefore, none of the primes on your list divide PP. Either PP is itself a new prime, or it is divisible by a prime you missed. (For example, 2×3×5×7×11×13+1=300312 \times 3 \times 5 \times 7 \times 11 \times 13 + 1 = 30031, which is 59×50959 \times 509.)

Ah, you might say, I was simply missing that one, thank you for finding it, let me add it to my list.

And the cycle repeats: each time, you find a prime that is not on your list. So there must be infinitely many primes.

OK, so there are infinitely many primes. (The proof above, by the way, is my retelling of a famous proof by Euclid.)

In that case, let’s ask another question: How many primes are there below some number? Mathematicians call this the prime counting function. We can graph it, with a line that counts up by one in a staircase at each prime:

Primes up to a number up to 2: 1 prime
0 20 40 0 20 40 60 80 100primes up to n (same scale as n)n
the count Li(n), the estimate ± √n around it, the room the Riemann Hypothesis leaves
up to

Sweeping along the number line. Each time the sweep crosses a prime, the count ticks up by one.

This seems incredibly regular! And in fact, it is. Gauss noticed as a teenager that, around nn, roughly one in every ln⁡(n)\ln(n) numbers is prime. So, primes “thin out” at a steady, predictable rate.

You can use this fact to estimate the prime counting function by Li⁡(x)\operatorname{Li}(x), graphed above as the orange dotted line, and written explicitly below:

Li⁡(x)≈1ln⁡2+1ln⁡3+⋯+1ln⁡x=∑k=2x1ln⁡k\operatorname{Li}(x) \approx \frac{1}{\ln 2} + \frac{1}{\ln 3} + \cdots + \frac{1}{\ln x} = \sum_{k=2}^{x} \frac{1}{\ln k}

(Strictly speaking, Li⁡\operatorname{Li} is an integral, rather than a sum, but they never differ by more than 1.)

In 1896, Jacques Hadamard and Charles-Jean de la Vallée Poussin independently proved that the percentage error of the above estimate will tend to 0 as xx tends to infinity (a fact so important it was named the Prime Number Theorem).

But ultimately that doesn’t say a whole lot. How quickly does it tend to zero? There could be some very large number where it suddenly jumps to a minuscule fraction. Or, it could very gradually tend to zero, but so slowly as to be useless. If the error were x0.999x^{0.999}, it would technically satisfy the Prime Number Theorem, but would effectively say that the whole estimate devolved into error!

The Riemann Hypothesis, which we’ll explore in more depth in the next blog post, makes a more precise statement:

For any xx higher than 2657, the absolute error is never more than:

x ln⁡(x)8π\frac{\sqrt{x} \, \ln(x)}{8\pi}

How tight is that? Well, x\sqrt{x} has about half as many digits as xx. Another way to get an intuition for that is: If the Riemann Hypothesis is true, then Li⁡(x)\operatorname{Li}(x) gets roughly the first half of the digits of the true count correct.

A x\sqrt{x} error also has another familiar interpretation. Flip xx fair coins and count the number of heads. Of course it is unlikely to be exactly half, but the count will generally be within x\sqrt{x} of x/2x/2.

Earlier I pointed out that the primes aren’t random: they lie exactly where their hole punch leaves them, giving rise to a regular trend. The Riemann Hypothesis, on the other hand, claims that primes deviate from that trend by not much more than coin flips do.

In the next post, I’ll explore what the “Riemann zeta” function is, what its zeros have to do with primes, and why the Riemann Hypothesis is really a statement about these zeros.


π Lanningham

I’m π, a mathematician by passion, and a software engineer by trade. I'm most well known for my role as CTO at SundaeSwap Labs, and for my passion for educating people. I run a Cardano Stake pool, known as 314pool. I've also written a few blog posts on topics that I feel I can explain well, which you'll find below.