Re: Prime math magic answer.
- Posted by William Eiten <atompunk at ROF.NET> Mar 08, 1998
- 736 views
> I thought about the code I had previously examined. > RDS's sieve is multiplying by 2 so that only the odd > numbers are filtered. 2 is the only even number that is > prime. All other prime numbers are odd. > > Exactly half the sieving is skipped/eliminated. I'm almost positive that after 3, every prime number is plus or minus 1 of a multiple of 6. 5 (6-1), 7 (6+1), 11 (6*2-1), etc. With that in mind, we could probably speed up the current algorithms, unless that's already in there. --------------------------------------------------- William ICQ# 1480159