Re: Prime math magic answer.

new topic     » goto parent     » topic index » view thread      » older message » newer message

> 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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu