Re: smallest prime number greater than n



It isn't a bad way to test for primality up to say
10^7 or 10^8. But 10^18?? NO WAY.

I suggest that you estimate the time required to prove
primality of an 18-digit number via trial-division.

I can do it in a few 10's of MILLISECONDS with the
proper algorithm. I suggest that you read either
Riesel's book or Crandall & Pomerance's book.
..

Coding language is irrelevant. Processor is irrelevant.
You don't want to prove primality via trial division
for anything beyond about 8 digits.

------------------------------------------------------

The actual application determines 15 digit primes in about 1/2 second and
determines 16 digit primes in about 1 1/2 seconds. And that result is
attributed to the code running in the Delphi programming language and
running on a 3.2 processor.

Of course many people give an awful prediction of result based on making a
list of primes...but it's not necessary to make a list of primes.

Now you can place the result anywhere in a hierarchy that you personally
choose and that for your own personal reasons. But I say that it has
application...

-----------------------------------------------------


.


Quantcast