On Thursday 23 June 2005 14:44, Diogo - Gmail wrote:
> Hi,
>
> My name is Diogo. I live in Brazil. I maid an algorithm in C/C++ that:
>
> 1) Verifies if a number 'n' is or isn't prime. If YES, ok, there's the
> prime. However, if NOT
>
> 2)Verifies the same from 'n + 1' until discover the next prime after 'n'.
>
> Inserting some conditions, as verifying the divisibility by 3, 4, (other
> than 2), and computing products between primes, isn't this algorithm will
> discover some prime with 10 million digits in approximately 1 year?
>
> Answer me if possible.
>

How long does your algorithm take to prove that 2^33219281-1 (the smallest 
prime exponent Mersenne number with at least 10 million digits) is prime?

The chance that a number about this size will be prime is about 1 in 23 
million. You would therefore expect to examine about 23 million candidates to 
find a 10 million digit prime. OK you can cut that by a large amount by 
eliminating candidates with small factors but you're still going to be left 
with a large number of "awkward" candidates - I'd guess at least one million. 
So unless your algorithm can prove primality of a 10 million digit number in 
the order of 30 seconds you're unlikely to find a prime in about 30 million 
seconds - one year is "only" 31,536,000 seconds.

If your primality proving method is rigorous and anything like as fast as 
that, you've made a major discovery - our best methods are several decimal 
orders of magnitude worse, even for special numbers like Mersennes. So please 
tell us about it, even if you have to write it up for a maths journal and/or 
patent the algorithm first.

Regards
Brian Beesley
_______________________________________________
Prime mailing list
[email protected]
http://hogranch.com/mailman/listinfo/prime

Reply via email to