Popular recipes tagged "number_theory"http://code.activestate.com/recipes/tags/number_theory/popular/2011-11-21T19:58:14-08:00ActiveState Code RecipesBase Expansion/Conversion Algorithm Python (Python) 2011-11-21T19:58:14-08:00Alexander James Wallarhttp://code.activestate.com/recipes/users/4179768/http://code.activestate.com/recipes/577939-base-expansionconversion-algorithm-python/ <p style="color: grey"> Python recipe 577939 by <a href="/recipes/users/4179768/">Alexander James Wallar</a> (<a href="/recipes/tags/base/">base</a>, <a href="/recipes/tags/base16/">base16</a>, <a href="/recipes/tags/base2/">base2</a>, <a href="/recipes/tags/base_conversion/">base_conversion</a>, <a href="/recipes/tags/base_expansion/">base_expansion</a>, <a href="/recipes/tags/conversion/">conversion</a>, <a href="/recipes/tags/lists/">lists</a>, <a href="/recipes/tags/numbers/">numbers</a>, <a href="/recipes/tags/number_theory/">number_theory</a>, <a href="/recipes/tags/python/">python</a>). Revision 3. </p> <p>This algorithm converts a base c number into a base b number. Parameters c and b are arbitrary are not constrained by any bounds. The input n is a list and the output is a list.</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>