How far is the list of known primes known to be complete?

So there is always the search for the next "biggest known prime number". The last result that came out of GIMPS was $2^{74\,207\,281} - 1$, with over twenty million digits. Wikipedia also lists the twenty highest known prime numbers, only the four smallest on that list have fewer than three million digits.

For some while now, I have been wondering about the smaller prime numbers we haven't found. How far up is the list of known primes known to be complete? Since $500$ to $1000$ digit primes are considered safe for the RSA algorithm, I'd assume that it's well below that. How far along the number line have we checked that there are no more primes to be found? How fast is this boundary moving forward, currently? Have we, for instance, checked the primality of all numbers below $10^{100}$, or are we stuck somewhere south of $10^{20}$?


The maximum of such list is far smaller than mentioned 500-digits. Due to the prime number theorem $\pi(x) \approx x/\log(x)$ so one could estimate that the list of prime numbers up to $x$ would require at the order of $x$ digits to represent.

So by using the sieve of Atkin the complexity is $O(x)$ for both time consumption and memory consumption. And all memory available is small enough to be feasible to traverse. This means that the memory available for storing such a list is what should be the limiting factor.

Basically this boils down to that the largest such list is as large as anybody have place (and need) for.

Now the total global storage is estimated to be at the order of $10^{21}$ bytes which means that the upper bound of such a prime number list is there. So there exist no complete list with primenumbers up to more than about twenty digits (and not even that since not all storage is devoted to store prime numbers).


This may be a somewhat unsatisfying answer, but no-one's really keeping a complete list of known primes (to the best of my knowledge). Moreover, it's fairly easy to come up with large primes, and it's fairly easy to "guarantee" (guarantee being a slippery term), that a given large number is prime.

The Miller-Rabin primality test is an algorithm that takes a number $n$, and a "certainty" parameter $m$, and (in layman's terms) if $n$ is prime, it will return "PRIME". If $n$ is composite, it will almost certainly (again, a slippery term) return "COMPOSITE", but there's a small probability $(\frac{1}{4^m})$ that it will return "PRIME".

However, by setting $m$ high enough, to, say, something greater than 40, then it essentially means the probability of a composite number being declared prime is smaller than you winning the jackpot in the lottery twice in one week. Thus, for almost ALL practical purposes, it suffices to work with primes that pass the Miller-Rabin test to a high degree of certainty. Henri Cohen famously called such numbers "Industrial Grade Primes".

If you're still interested in having "proof" that a number is prime, may I suggest reading up on prime certificates. I haven't ever personally come across a situation in which you'd prefer a certified prime to an industrial grade prime however.

Finally, as a quick example, Mathematica can generate very large primes easily. The Mathematica command "RandomPrime[{10^1000, 10^1001}]" generates a random 1000 digit prime in 0.40625 seconds on my five year old desktop machine. This should give you some indication as to why mathematicians generally don't keep long lists of all known primes.