Popular recipes tagged "eratosthenes"http://code.activestate.com/recipes/tags/eratosthenes/2011-11-27T08:27:25-08:00ActiveState Code RecipesSieve of Eratosthenes (Prime Generator) (Python) 2011-11-27T08:27:25-08:00Assil Ksiksihttp://code.activestate.com/recipes/users/4180094/http://code.activestate.com/recipes/577965-sieve-of-eratosthenes-prime-generator/ <p style="color: grey"> Python recipe 577965 by <a href="/recipes/users/4180094/">Assil Ksiksi</a> (<a href="/recipes/tags/eratosthenes/">eratosthenes</a>, <a href="/recipes/tags/prime_generator/">prime_generator</a>). </p> <p>A simple implementation of the Sieve of Eratosthenes in Python. The code should be self-explanatory, but I've added a docstring and some comments just in case.</p> <p>Constructive criticism is of course appreciated.</p> Sieve of Eratosthenes (Python) 2008-12-27T11:45:09-08:00Louis RIVIEREhttp://code.activestate.com/recipes/users/4035877/http://code.activestate.com/recipes/576596-sieve-of-eratosthenes/ <p style="color: grey"> Python recipe 576596 by <a href="/recipes/users/4035877/">Louis RIVIERE</a> (<a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/eratosthenes/">eratosthenes</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/primes/">primes</a>). Revision 3. </p> <p>Returns primes &lt; n.</p>