Popular recipes tagged "sieve"http://code.activestate.com/recipes/tags/sieve/2011-10-10T07:49:08-07:00ActiveState Code RecipesYet another prime number sieve (Python) 2011-10-10T07:49:08-07:00Maxim Krikunhttp://code.activestate.com/recipes/users/4168574/http://code.activestate.com/recipes/577901-yet-another-prime-number-sieve/ <p style="color: grey"> Python recipe 577901 by <a href="/recipes/users/4168574/">Maxim Krikun</a> (<a href="/recipes/tags/sieve/">sieve</a>). </p> <p>A one-liner that returns the list of prime numbers up to n. The inner lambda is the sieve.</p> sieve-of-eratosthenes (python) (Python) 2010-05-15T18:53:11-07:00Rahul Rajhttp://code.activestate.com/recipes/users/4173983/http://code.activestate.com/recipes/577228-sieve-of-eratosthenes-python/ <p style="color: grey"> Python recipe 577228 by <a href="/recipes/users/4173983/">Rahul Raj</a> (<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/efficient/">efficient</a>, <a href="/recipes/tags/sieve/">sieve</a>). </p> <p>sieve-of-eratosthenes algorithm with efficient scaling for big numbers.</p> Prime Number Generator (Python) 2009-02-03T15:47:06-08:00dthhttp://code.activestate.com/recipes/users/4169078/http://code.activestate.com/recipes/576640-prime-number-generator/ <p style="color: grey"> Python recipe 576640 by <a href="/recipes/users/4169078/">dth</a> (<a href="/recipes/tags/eratosthene/">eratosthene</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/number/">number</a>, <a href="/recipes/tags/of/">of</a>, <a href="/recipes/tags/prime/">prime</a>, <a href="/recipes/tags/sieve/">sieve</a>). Revision 7. </p> <p>Generate all prime numbers up to n.</p>