Popular recipes tagged "factorial" but not "loops"http://code.activestate.com/recipes/tags/factorial-loops/2013-08-10T03:40:02-07:00ActiveState Code Recipesde Polignac's Formula (Python) 2013-08-10T03:40:02-07:00Samuel James Ericksonhttp://code.activestate.com/recipes/users/4187478/http://code.activestate.com/recipes/578632-de-polignacs-formula/ <p style="color: grey"> Python recipe 578632 by <a href="/recipes/users/4187478/">Samuel James Erickson</a> (<a href="/recipes/tags/factorial/">factorial</a>, <a href="/recipes/tags/n/">n</a>, <a href="/recipes/tags/prime/">prime</a>, <a href="/recipes/tags/primes/">primes</a>). Revision 4. </p> <p>Obtains the total number of factors of p in n! for any prime p.</p> Calculate Trailing Zeroes in a Factorial (Python) 2011-08-15T17:23:03-07:00Stijn de Graafhttp://code.activestate.com/recipes/users/4178055/http://code.activestate.com/recipes/577844-calculate-trailing-zeroes-in-a-factorial/ <p style="color: grey"> Python recipe 577844 by <a href="/recipes/users/4178055/">Stijn de Graaf</a> (<a href="/recipes/tags/calculate/">calculate</a>, <a href="/recipes/tags/calculation/">calculation</a>, <a href="/recipes/tags/factorial/">factorial</a>, <a href="/recipes/tags/trailing/">trailing</a>, <a href="/recipes/tags/zero/">zero</a>, <a href="/recipes/tags/zeroes/">zeroes</a>). </p> <p>Calculates the number of trailing zeroes on the end of x! when the user inputs x.</p> Faster Factorial (Python) 2010-05-23T16:06:33-07:00Ivo Danihelkahttp://code.activestate.com/recipes/users/4168810/http://code.activestate.com/recipes/577241-faster-factorial/ <p style="color: grey"> Python recipe 577241 by <a href="/recipes/users/4168810/">Ivo Danihelka</a> (<a href="/recipes/tags/factorial/">factorial</a>). Revision 3. </p> <p>If you are calling factorial() many times, it is worth to cache the computed factorials.</p>