Re: Length of sequence of consecutive primes starting at 2

From: Robert Silverman (anonymous_at_mathforum.org)
Date: 07/20/04


Date: Tue, 20 Jul 2004 15:12:57 +0000 (UTC)

On 20 Jul 2004, Joseph Weinberg wrote:
>rsilverman@draper.com (Bob Silverman) wrote in message news:<200407191526.i6JFQck07076@proapp.mathforum.org>...
<snip>

>"known" consecutive primes. What I mean by consecutive primes is the
>following. The sequence 2,3,5,7,11,13 is made up of consecutive
>primes while the sequence 2,3,5,11,13 is not (it's missing the prime
>number 7). Understand what I mean? And yes, I mean the largest list
>that has ACTUALLY been published.

Such a list is going to be fairly small. The largest PUBLISHED list
I know is VERY old and was published by D.N. Lehmer. It goes up
to 10 million. Modern researchers might have somewhat larger tables
stored on disk somwehere but I can't image the need to store such
a table beyond (say) 10^9 or so. Computational number theorists,
if they need primes to (say) 10^12 would generate them as needed.

>
>> (3) If you mean that you are looking for a list of ALL primes below
>> a certain bound and you want the list with the largest bound that has
>> actually been calculated, I can tell you that such a list does not
>> exist per se. Or rather, that such a list changes constantly, so you
>> are asking for a moving target. It is also one thing to calculate
>> such a list, it is another to store and publish it.
>
>OK. Can I find the largest upper bound published somewhere? It's OK
>if the bound in slightly outdated.

May I ask why you need ALL the primes? As I stated, at one time or
another all primes up to about 10^12 have been generated. I doubt if
ANYONE knows what the largest upper bound truly is. It is at least 10^12.

>
>> (4) If you want a list of primes up to some bound B, it would be
>> faster to generate it via a sieve than to read it over the internet.
>> And storage for any reasonable B would be problematic. You are
>> talking terabytes.
>
>Nope, I'm not interested in this.

Huh? This contradicts what you specifically asked for!!

You asked for the largest published table. All primes to 10^12
have been generated. It would take "about" 10^12 bytes to store the
complete table. There are roughly 10^12/log(10^12) such primes,
and all primes > ~4 x 10^9 will take more than 4 bytes apiece to
store. There are compact bit maps that can be constructed, but these
do not store the primes themselves. And even they are large.

>
>> (5) The answer to your last question is trivial. If B is the bound
>> on your list, then M41 - B is the number you are looking for.
>
>See (3) (I am looking for actual numbers, not theoretical results)

How is M41 - 10^12 a "theoretical result"??

>
>> (6) At one time or another, lists of all primes up to at least 10^12
>> have been generated. But I can't imagine anyone putting such a list
>> into permanent or even semi-permanent storage. It would be pointless.
>> Further, if at anytime someone did store such a list, extending it
>> a little bit would be trivial.
>
>Really? How would you that (I mean extend the list)? Doesn't this
>suggest that it would be trivial to find the prime following M41?

I'm not sure I understand you. You seem to be confused. The largest
table of the type you ask for has maybe 12 digits in the largest prime. M41 has over 6 million. How do you jump to the conclusion that
because I say it is easy extending the complete table from (say)
10^12 to (say) 2*10^12, that it is thereby easy to find the next
prime after M41? In the first case you are dealing with 12 digit
primes, and in the latter with 6 million digit primes.

>
>> (7) If you tell me what you REALLY want, I can and will help. But
>> your questions are too imprecise for me to discern your real desire.
>> Please. If you are going to discuss mathematics, then you need to
>> learn how to pose your questions more precisely.
>
>What I am REALLY wondering about is the following. The largest known
>primes are Mersenne primes. The largest non-Mersenne prime is much
>smaller than the largest Mersenne prime [1]. It seems to me that
>there should be many primes between these two.

May I suggest that you look up the "Prime Number Theorem"?
There will indeed be many, many primes between the two.

  I am wondering whether
>there exist any efficient methods of constructing primes that would
>fall into this range.

Random primes? No.
Primes of special form? Yes.

Efficient methods exist to find primes of the form (say) k^2^n + 1.
The special form allows use of FFT based multiples and fast modular
reduction also makes the primality testing algorithm rather simple.

May I suggest that you get a book on this subject?
Hans Riesel, "Prime Numbers and Computer Methods for Factorization"
is a good book for those with just a modest math background.



Relevant Pages

  • Re: hash table idea good or no good?
    ... It unsigned long is 32 bits and the primes I listed are much smaller ... You want to use strings as the key. ... You want to store strings, but you use the entire string as one big ... least common multiple scheme used above. ...
    (comp.programming)
  • Re: Prime lists and Computation
    ... > Q2 Is their a complete list of primes to X Published? ... sufficient storage is available to store them all. ... prime lists for trial division. ... of digits by 3 would double the factoring time. ...
    (sci.math)
  • Re: Calaulation problem
    ... so where is the problem of relevance? ... others as an array of primes. ... guess and store each number in the way that seemed best at the time. ... Also that will only work for integers, you will never find any primes ...
    (microsoft.public.vb.general.discussion)
  • Re: Next prime algorithm
    ... If you are dealing with simple 32 bit unsigned integers/longs, ... I can compute the next 1000 primes for n in the ... If you can store primes <= sqrtyou can even eliminate many of the ... store them as constants in your algorithm code. ...
    (comp.lang.cpp)
  • Re: My vbScript answer to the Google Question. {the first 10 digit prime in e}.com
    ... 10 digit numbers are not very big. ... primes is faster than my method of using Eratosthenes sieve to ... precalculate the actual primes. ... I keep getting a type mismatch error on this line: ...
    (microsoft.public.scripting.vbscript)