Popular recipes tagged "prime_number" but not "algorithms"http://code.activestate.com/recipes/tags/prime_number-algorithms/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>
Find the nth prime in python (Python)
2013-01-06T20:23:21-08:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578403-find-the-nth-prime-in-python/
<p style="color: grey">
Python
recipe 578403
by <a href="/recipes/users/4184772/">Captain DeadBones</a>
(<a href="/recipes/tags/primes/">primes</a>, <a href="/recipes/tags/prime_generator/">prime_generator</a>, <a href="/recipes/tags/prime_number/">prime_number</a>).
</p>
<p>This is a nth 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>
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>
A fast & memory-wise prime number generator up to N (Python)
2010-08-13T18:28:00-07:00robert.william.hankshttp://code.activestate.com/recipes/users/4174481/http://code.activestate.com/recipes/577357-a-fast-memory-wise-prime-number-generator-up-to-n/
<p style="color: grey">
Python
recipe 577357
by <a href="/recipes/users/4174481/">robert.william.hanks</a>
(<a href="/recipes/tags/fast/">fast</a>, <a href="/recipes/tags/numpy/">numpy</a>, <a href="/recipes/tags/primes/">primes</a>, <a href="/recipes/tags/prime_generator/">prime_generator</a>, <a href="/recipes/tags/prime_number/">prime_number</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>Using python 2.6 & numpy.
This code was first posted <a href="http://stackoverflow.com/questions/2897297/speed-up-bitstring-bit-operations-in-python/2908512#2908512">here</a></p>
Prime Number Generator Checker (Python)
2008-10-28T12:14:03-07:00TheMachineCharmerhttp://code.activestate.com/recipes/users/4167676/http://code.activestate.com/recipes/576543-prime-number-generator-checker/
<p style="color: grey">
Python
recipe 576543
by <a href="/recipes/users/4167676/">TheMachineCharmer</a>
(<a href="/recipes/tags/number_theory/">number_theory</a>, <a href="/recipes/tags/primality_testing/">primality_testing</a>, <a href="/recipes/tags/prime_number/">prime_number</a>).
Revision 2.
</p>
<p>This program implements primality testing function.
The function is then used to generate prime numbers
in the given range.</p>