12

So recently, an absurdly large prime number was found, but a lot of prime numbers less than it are still not known. I am wondering up to where we know all the primes.

I put "currently publicly known" because there is a chance that some government agency has a longer list for crypto reasons or something like that.

fhyve
  • 2,495
  • http://math.stackexchange.com/tags/prime-numbers/info – draks ... Mar 14 '13 at 08:16
  • Such a prime list would be utterly useless for crypto. – CodesInChaos Mar 14 '13 at 08:39
  • @CodesInChaos Why? – Alexander Gruber Mar 14 '13 at 08:54
  • @AlexanderGruber I can't think of any use. If you want to use them for breaking RSA, that's hopeless. Even easily broken RSA512 has 256 bit primes, of which there are far more than can be calculated or stored. There are algorithms which use smaller primes, for example Poly1305 uses a 130 bit prime. But that prime isn't secret, and was chosen to be the largest prime smaller than 2^130. – CodesInChaos Mar 14 '13 at 09:00
  • Is there no research value in cryptography in looking at families of specific primes? – Alexander Gruber Mar 14 '13 at 09:03
  • How would you like to define "publicly known"? Does it require the number to be written done in some (electronic) publicly available manner? – Marc van Leeuwen Mar 14 '13 at 13:44
  • @MarcvanLeeuwen That's what I had in mind, but as below, that question might not be too useful. – fhyve Mar 14 '13 at 18:27
  • The reason that such a list would be useless is that it would provide no benefit. The problem in factorising a large number is not that it's difficult to find primes as candidates, but that there are so many of them and you need to test them all, and you get no useable info from the failure of one prime as a factor to find the real factors. ie you just have to go through them all. Even at 10^18 the gap between primes is under 1500 so even if you knew only the primes you'd still have over 10^14 of them to test. – user467257 Jun 22 '15 at 08:55

3 Answers3

8

The most efficient known way (please correct me if I'm wrong) to generate a list of consecutive primes from $2$ to $n$ is the Sieve of Eratosthenes, which in an optimized implementation (at least relying on what's written in Wikipedia) requires $O(n)$ time and something like $O(n^{1/2+\epsilon})$ memory. Given current computing abilities, I'd guess your prime is somewhere between $2^{50}$ and $2^{60}$.

Edit to clarify: Asking for an exact answer is meaningless, because given a prime of that size, it's pretty fast to calculate the next one.

Edit 2 to answer your question with another question. What do you mean by "known"? Do you want them all to be written down in a physical list? By the prime number theorem, there are about $\frac n {\log n}$ primes up to $n$, so you'd need a pretty big piece of paper (or hard drive) to write down the primes up to $2^{60}$ :)

  • 5
    I think there are faster sieves, like the Sieve of Atkin. – Waleed Khan Mar 14 '13 at 11:28
  • Nice, didn't know that one. But it doesn't change my guess by much. (And you can't do better than $O(\frac {n}{\log n})$ anyway, by PNT.) – Yoni Rozenshein Mar 14 '13 at 11:36
  • For very large primes, I believe that probabilistic approaches are used to verify prime-ness. So I think that it may be possible that we can get faster the $ \mathcal{O}\left(\frac{n}{\log n}\right) $ bound at the expense of accuracy, which we can rectify by later verifying the prime with another computer. – Waleed Khan Mar 14 '13 at 11:41
  • 3
    Waleed, my claim is simply that if you want to print $k$ numbers, you can't do it faster than $O(k)$. – Yoni Rozenshein Mar 14 '13 at 14:45
  • So you are saying a better question would be how large a list of primes can you generate in a reasonable amount of time given current hardware and algorithms? – fhyve Mar 14 '13 at 18:25
  • @fhyve: I think that's a different way of asking the same question. How else would such a prime be "known" besides if someone had been able to compute such a list? – Yoni Rozenshein Mar 14 '13 at 21:11
2

I don't think you can pinpoint such a prime. If you had a candidate, it wouldn't be too hard to determine the next larger prime. There are just too many of them.

azimut
  • 22,696
0

Yoni Rozenshein (https://math.stackexchange.com/users/36650/yoni-rozenshein), Currently, what is the largest publicly known prime number such that all prime numbers less than it are known?, URL (version: 2013-03-14): https://math.stackexchange.com/q/330221 "Given current computing abilities, I'd guess your prime is somewhere between 2^50 and 2^60." Since autumn 2020 that "time dependend prime" is well above 2^78. See the b-file of OEIS https://oeis.org/A033844 ("a(n) = prime(2^n)"). Line 78 in this textfile reads: 78 17254990129969542495182251 It may take some more years to update https://oeis.org/A095124 ("a(n) = prime(2^(2^n))") beyond a(6) = 870566678511500413493.