Idk if anyone discovered this (or care about it) but when using the sieve, you can just check the largest square that doesn't exceed the upper limit number. E.g. for 1-500 you only need to check to 22 since 23^2=529 which exceeds 500
-
-
-
Really you only need to go up the greatest prime less than √n. So in the case of 500, you can safely check up to 19.
End of conversation
New conversation -
-
-
If it wasn't old, it wouldn't be ancient. And if it wasn't effective, it wouldn't be an algorithm.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This version is a somewhat optimized version of the sieve, since it starts changing the colors of squares greater that n^2. In the original version of the sieve, 6 should be green 10,15,20 should be blue 14,21,28,35,42 sould be yellow ....
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I successfully parallelised the Sieve of Eratosthenes algorithm on an NVIDIA V100 GPU which took 10 mins to find all 131,915,299 primes <2bn. See thread: https://twitter.com/MurrayData/status/1127506342107865088 … https://twitter.com/MurrayData/status/1127512452537757696 …https://twitter.com/MurrayData/status/1127531887700905985 …
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
This Tweet is unavailable.
-
-
A similar procedure was used with sheep by Henley Bowser-Weems (1828-1902) in The Cotswolds. The flock was arranged in a like pattern then spray painted different colors. The last ones painted were designated prime and fetched a higher price at market. No one caught on.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Guess - Every problem no matter how hard has a linked lists solution. a->b->x . So the brain as problem solver operates by linked memory. // Per
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
That’s very basic mathematics. Also the order of code increases once n becomes very large. Like 1 mn
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Why I haven't seen this earlier
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
