We have known since Euclid that there are an infinite number of prime numbers. The largest known one is 2^{74,207,281} − 1, a 22,338,618-digit number, which, depending on how you printed it, would take up to several tens of volumes to print out. Of course, that's peanuts compared to primes that would require all the volumes in the British Library (100 million volumes or so), a city-sized library, a planet-sized library, a galaxy-sized library, a supercluster-sized library or a Library of Babel-sized library. All of which could contain nothing but a prime.

I've argued in the past that large numbers like 2^{74,207,281} − 1, much less cosmological ones like a Library of Babel prime, are objects of a fundamentally different ontological kind to numbers like 5, 31 or even 1,973 (or, indeed, 2,017). At some point, you have to think to yourself, what can I do with this number? Well, count things, of course. One thing you might count are the primes themselves. So 2^{74,207,281} − 1 is a prime, but there's also a 2^{74,207,281} − 1^{th} prime.

We are never (probably) going to know that, but what is the prime rank of 2^{74,207,281} − 1? We can, of course, easily enough, get an estimate of how many primes there are less than a given number (about n/ln(n)). In the case of 2^{74,207,281} − 1, that's still a very large number (something like 2^{74,207,273}, so aren't going to have a complete list of all the numbers stored on our hard disks. But what then is the highest known contiguous prime? Perhaps oddly, there isn't really any answer to this question. See this page on Chris K. Caldwell's Prime Pages. Chris gives a list of the first 50 million prime (last one is just 982,451,653 - less than a billion). All primes up to 10^{18 }have been calculated, but not stored, but not calculated yet up to 10^{19}. It easy to calculate primes in those regions, the numbers themselves are very big at all (only 18 digits, so 18 bytes), but there's a heck of a lot of them.

According to the FoAK, there are 24,739,954,287,740,860 primes less than or equal to 10^{18} and 1,699,246,750,872,437,141,327,603 primes less than or equal to 10^{26}. (Are those numbers exact?) So there are about 2.4x10^{16} primes less than 10^{18}. That would require 4.3x10^{17} bytes of storage (actually less because you only need 4 bits to store a digit, so half that). A terabyte is 10^{12} bytes, so you need 200,000 1-terabyte drives. So you could store all the numbers in principle. By Moore's law, you could do that at home in 17 Moore's law periods or less.

Caldwell says

If you want an even longer list, run a sieve program on your machine. Folks quite regularly resieve to find all the primes up to 1,000,000,000,000, this should take well less than a minute.

I don't know how long it takes to calculate a prime in the region of 10^{18}, but you could set up a process to calculate them and then tweet them. That way, there would be a permanent record of each. The problem is there are so many, you'd either crash Twitter or take forever to tweet much than a handful.

Numbers do get big very quickly.

## Comments