Prime numbers are presented as the basic building blocks of arithmetic: every number can be factored into a unique product of primes, and numbers that cannot be broken down further are themselves prime. The chapter explains that Euclid proved there are infinitely many primes, and describes the Sieve of Eratosthenes, an ancient algorithm for finding all primes up to a given number by repeatedly marking off multiples of each newly found prime. It also notes a shortcut: you only need to sieve up to the square root of your largest number, since any composite number must have a factor at or below that point.
- 01
The hosts use factoring 20 into 2x2x5 and 32 into 2^5 as worked examples of how any number decomposes into primes.
- 02
Prime factorization is linked to cryptography, since factoring large numbers underlies public and private key encryption.
- 03
The movie Contact is cited as a cultural example, where a sequence of prime-numbered radio bursts (2, 3, 5, 7...) is treated as proof of alien intelligence because primes would be a universal language.
- 04
Eratosthenes of Cyrene, who devised the sieve, is also noted as the same ancient Greek credited with calculating Earth's circumference using a shadow measurement.
- 05
The square-root shortcut is explained via the idea that in multiplication, unlike addition, the 'halfway point' to a number is its square root, so factors pair up on either side of it.
838 words · auto-generated from the episode video
6:11So first of all, prime numbers. They are the central objects in number theory, and they're the fundamental building blocks of mathematics. They're like the atoms of numbers. You can take any number and you can factor them into a bunch of primes, and that'll tell you what the number is made out of. For example, 20 is 2 times 2 times 5. Every number can be written like that. 32 is 2 to the fifth power. You can take powers of primes and multiply them together, and you'll get every single number ever. If you can't, if you can't break it down, then, well, it's just another prime, right? These things are used in cryptography a lot.
6:52You can imagine, like, factoring numbers is how we get public and private encryption. and it's so fundamental that in the movie Contact there's that scene where Jodie Foster is convinced that aliens are actually talking to her and how does she know? She's receiving radio signals that are in bursts of prime numbers so you get like a boop boop and then there's a wait and then you get boop boop boop so there's three and then you get a wait and then it goes doop boop boop boop five it doesn't go to four it skips four it skips six it goes to seven And it does the first like 20 or 50 primes or something like that. That's like, it's so convincing that this is clearly of intelligent
7:35origin. There's a politician that comes in that's like, why aren't they just speaking in English? And it's like, well, yeah, primes are kind of the universal language because even aliens would understand primes. They might not understand left versus right, but they'll understand primes. They will definitely understand primes, right? Now, one of the things we would like to do is count how many prime numbers there are below a certain number. We'd like to know how many there are. It was proved very early on that there are an infinite number of primes. This is by Euclid. And shortly thereafter, there was a common algorithm. The algorithm to accomplish the counting was called the sieve of Eratosthenes. This is attributed to Eratosthenes of Cyrene, which is a 3rd century BCE Greek.
8:19The same guy who calculated the circumference of the earth using that shadow trick with the obelisk in Alexandria. Or maybe it was a well. Something like that. But you know, this guy was a genius, right? And this is still to this day one of the better algorithms for calculating where are the prime numbers. Here's what you do. You create a list and you start with a list up to a certain n. In this case, it's 120. and now I'm going to start with the first prime being 2 because that's unmarked so it's an unmarked list and I'm going to tag every second number then I'm going to go to the next thing that is unmarked in which case it was 3 and I'm going to
8:59tag every third number then I'm going to go to the next which was unmarked which is now going to be 5 because 4 was already tagged by 2 and I'm going to tag every fifth number and I'm going to basically repeat this process and look for unmarked numbers. Every single time I come up with a new unmarked number, that becomes the new prime number in my list. And from this, I can actually figure out all of the primes that are below a certain number. One of the tricks to make this go faster is you only have to go up to the square root of the largest number in your list, okay? You don't have to go, you don't have to like keep going, oh, what's the next
9:40unmarked number? What's the next unmarked number? and then I have to like keep going down the list to like tag all of its multiples. Like here, all I have to do is go up to like 10. And as soon as I get to 11, every single unmarked number that is left is a prime. And that has to do with the fact that in multiplication, the square root is kind of like the halfway point. And so whenever you have multiples, like you're going to have multiples on either side of the square root to get to some big number, right? In like addition, the halfway point is literally the halfway point. But in multiplication, it's like X to the one half, you know? so this is the algorithm that people have used it's called the sieve of eratosthenes and it's a sieve because you're kind of taking
10:22out multiples of two then you're taking out multiples of three then you're taking out multiples of five and the next prime and the next prime and whatever is left in this sieve is the list of prime numbers right that makes total sense
MathematicsNumber TheoryArtificial IntelligenceMathematical ThinkingFormal Verification