EP 69 · 18:16

Gauss and the distribution of primes

From How AI Helped Prove the Riemann Hypothesis and What Comes Next

Episode
6/23
Watch How AI Helped Prove the Riemann Hypothesis and What Comes Next
In this chapter

Carl Friedrich Gauss, as a teenager, noticed by hand-counting primes that the probability a number near x is prime is roughly 1 divided by the natural log of x. Summing this probability across integers produces the logarithmic integral Li(x), while a simpler closed-form version of the same idea is x divided by log(x); both are used as approximations to the actual prime counting function, which tallies how many primes fall below a given number. The chapter frames the gap between the real prime count and these two approximations, one tending to overshoot and one to undershoot, as the setup needed to later understand the Riemann hypothesis.

  1. 01

    Worked examples given: near one million (log is about 13.8) roughly 1 in 14 numbers is prime, and near one trillion (log about 27.6) roughly 1 in 28 is prime.

  2. 02

    A coin-flip analogy is used to explain why multiplying a per-number probability by the range of integers gives an expected prime count, motivating the x/log(x) approximation.

  3. 03

    The logarithmic integral is noted to eventually overshoot the true prime count far beyond the range shown, though that crossover is flagged as outside the scope of the discussion.

  4. 04

    An on-screen correction notes the actual number of primes below 100 is 25, not the 26 stated in the discussion.

Transcript

848 words · auto-generated from the episode video

18:19that we have to go through. It's always a German. Which is Karl Friedrich Gauss. Some people say he is the greatest mathematician, even greater than Euler. Blackbird Physics said this in one of his videos. I don't think he knows what he's talking about. I'm calling you out right now. Euler all the way, baby. But Gauss was great in his own right. At the age of 15, he became interested in counting prime numbers by hand. Because I guess that's what you do when you're a savant at 15 in Germany. And he realizes that the probability that any given number is prime goes like 1 divided by the log of that number.

19:03Okay, here's what I mean by that. Like around any large number x, roughly 1 out of every log x integers are prime. Explicitly, we can do this. We can say, okay, around a million, right? The log of a million is about 13.8. so that means e to the 13.8 power is about a million 13.8 is about 14 so that means around a million if you were to like pick any random integer the chance that that random integer is prime is one divided by 14 or one in every 14 numbers near one million is prime that's what he notices by just doing this by hand at a million okay a

19:46large enough number where like this um approximation starts to hold that's so which is insane to think about right um at 10 to the 12 the log of 10 to the 12 is 27.6 so there one One in every 28 numbers is prime. So near a trillion, one in every 28 numbers is prime. And imagine doing this at 15. Yeah. No calculator, just raw dogging on pieces of paper, right? Now, from this density, we can actually have an analytic expression that approximates the prime counting function.

20:27The prime counting function is how many primes are there before a certain number? Right? Like before 20, there are 8 primes, I think, right? 2 3 5 7 11 13 17 19. Actually, there are, yeah, 8 primes. I don't know why I didn't use my thumb there. But yeah, 8 primes, okay? At 100, it's 26. There are 26 prime numbers before 100. The question is, for any n that's large enough, how many prime numbers are there? well we already know that the probability that any given number around that big number is prime is one divided by log of that number right and so what you

21:11can do is just add up all of those probabilities and because like at any given point the chance is one over ln of t well you do one over ln of two plus one over ln of three plus one over ln of four blah blah blah blah and you get this plot and you get this plot that is the integral of one over ln of t that's the li the logarithmic integral of x and that's the red dotted line and you can see the red dotted line kind of overshoots at least for this range of values there is a range of values where the the blue curve which is the actual prime counting curve is going to overshoot the red but that's really really far away not the scope of this episode yeah um and on the

21:54the the black the black dotted line is if you just wanted instead of the thing in log in integral form if you just wanted kind of a closed form approximation it would just be x divided by log x like however far you're going just x divided by log x would be and it kind of makes sense because like you know like if I have a coin flipper that's um heads every third like one third and tails every two thirds right if I have a sequence of um 10 coin flips how many on average are going to be heads well that's just going to be 10 multiplied by the probability that it's head so 10 over 3 yeah right in this case

22:36that's that's exactly what's happening that makes sense right and that is an undershoot the the key to understanding this relationship is that the prime counting function which is in blue is closely approximated by these two functions either the logarithmic integral or n divided by log n okay now understanding the relationship between that blue and those two dotted lines that is key to understanding the Riemann hypothesis because it's giving us basically this upper and lower bound and within which we will find the primes we're looking for exactly and and because this relationship is so important in the last episode

23:16I kind of told you to take that dotted line and the and the and the blue counting function for granted that relationship for granted but like these two yeah well not yeah it's like not not today yeah well you know we've we've solved the Riemann hypothesis.

From the episode
  1. EP 69

    How AI Helped Prove the Riemann Hypothesis and What Comes Next

    The Riemann Hypothesis from first principles: primes, zeta zeros, the Alpöge–Claude proof and what AI means for the future of mathematics.

    How AI Helped Prove the Riemann Hypothesis and What Comes Next

MathematicsNumber TheoryArtificial IntelligenceMathematical ThinkingFormal Verification