Popular recipes tagged "prime_generator" but not "primes"http://code.activestate.com/recipes/tags/prime_generator-primes/2013-01-19T03:58:05-08:00ActiveState Code Recipes"Effcient" Prime Number Generator in Python (Python) 2013-01-19T03:58:05-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578402-effcient-prime-number-generator-in-python/ <p style="color: grey"> Python recipe 578402 by <a href="/recipes/users/4184772/">Captain DeadBones</a> (<a href="/recipes/tags/prime_generator/">prime_generator</a>, <a href="/recipes/tags/prime_number/">prime_number</a>). </p> <p>This is a prime number generator in python that I put together for an article I wrote <a href="http://thelivingpearl.com/2013/01/06/how-to-find-prime-numbers-in-python/">How To Find Prime Numbers In Python</a></p> <p>Please Note. This is only efficient per the article discussing this code in the link above. See comments for a better library to generate prime numbers.</p> Genreate x digits prime number in python, version 1 (Python) 2013-01-06T20:25:20-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578404-genreate-x-digits-prime-number-in-python-version-1/ <p style="color: grey"> Python recipe 578404 by <a href="/recipes/users/4184772/">Captain DeadBones</a> (<a href="/recipes/tags/prime_generator/">prime_generator</a>, <a href="/recipes/tags/prime_number/">prime_number</a>). </p> <p>This is a prime number generator in python that I put together for an article I wrote <a href="http://thelivingpearl.com/2013/01/06/how-to-find-prime-numbers-in-python/">How To Find Prime Numbers In Python</a>. The script will generate a prime number of x digits for small numbers, less than 10. </p> Simple Prime Number Generator in Python (Python) 2013-01-06T20:18:38-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578400-simple-prime-number-generator-in-python/ <p style="color: grey"> Python recipe 578400 by <a href="/recipes/users/4184772/">Captain DeadBones</a> (<a href="/recipes/tags/prime_generator/">prime_generator</a>, <a href="/recipes/tags/prime_number/">prime_number</a>). </p> <p>This is a simple prime number generator in python that I put together for an article I wrote <a href="http://thelivingpearl.com/2013/01/06/how-to-find-prime-numbers-in-python/">How To Find Prime Numbers In Python</a>.</p> <p>Note: There are more efficient ways to do this. Please look at my other recipes. </p> Prime Number Generator in Python (half effcient) (Python) 2013-01-06T20:20:49-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578401-prime-number-generator-in-python-half-effcient/ <p style="color: grey"> Python recipe 578401 by <a href="/recipes/users/4184772/">Captain DeadBones</a> (<a href="/recipes/tags/prime_generator/">prime_generator</a>, <a href="/recipes/tags/prime_number/">prime_number</a>). </p> <p>This is a simple prime number generator in python that I put together for an article I wrote <a href="http://thelivingpearl.com/2013/01/06/how-to-find-prime-numbers-in-python/">How To Find Prime Numbers In Python</a>. In this one we cut the numbers in half so it is only slightly more efficient than the simplest prime number generator. </p> <p>Note: There are more efficient ways to do this. Please look at my other recipes. </p> Sieve 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>