Thread: New Computation
View Single Post
Old 2011-07-12, 17:25   #2
firejuggler's Avatar
Apr 2010
Over the rainbow

50048 Posts

Mask's method

The method is to calculate a mask , wich you can apply to a number range.

1)One populate the mask with all the prime
2) One remove the multiple of 5,7,11,13,17,23 ( note : he forgot 3 and 19)

Use of the mask
Put the mask at 0 to a multiple of the size of the mask.
On that range, One remove odd multiple of the mask population , starting with 29.
Once you are done, you have all the prime numberon that interval.

FYI, this method is far quicker than the most efficient implementation of Erasthomene sieve for 2 reason :

-One remove only the odd multiple so, one compute 2 time less
-While erastomene work on all the interval value, my method work on 1 third of the value
Ok so :
first flaw :you say the first step is to 'populate' the mask with all the prime number .... but how? since your objective is to determie them?

second : you forgot 3 and 19 in your listed prime

third :it can only work up to 292, after that you may misssome, unless you continue to 'populate' your mask after that

4 : you will remove more ' candidate' if you start with the lowest prime

and I think this method is called the ' wheel'

premier probleme: La premiere etape de ta methode consiste a remplir le 'masque' avec TOUT les nombres premier... comment, puisque le but de ton implementation est de les determiner?

second probleme : tu as oublié 3, et 19 dans ta liste de NP

Troisieme probleme : a moi de continuer a nourrir ton 'masque' avec de nouveau nombre, ça ne marchera que jusqu'a 292

Quatrieme chose : Tu retirera plus de candidat si tu commence par le plus petit des nombres premier.

Et je crois que cette methode existe deja, sous le nom de ' roue'
firejuggler is online now   Reply With Quote