How to factor using Python?

Mark Dickinson dickinsm at gmail.com
Tue Mar 11 15:50:41 CET 2008


On Mar 10, 7:32 pm, Nathan Pinno <MadComputer... at gmail.com> wrote:
> Thanks on the factoring bit, but I did mean factorial, not factoring.
> How do I code that correctly, so that I can figure the following
> equation out: cos(Pi * (z-1)! / z). Python returns a invalid syntax
> error and highlight the !. So it would be nice to find a way to solve
> such a problem.

Aha.  I've just found the "Is there a mathematical formula that will
find prime numbers?" thread that you started over on sci.math.
It looks like at least one of us has been trolled.  I suggest you:

(1) Ignore the formula Gerry gave you.  It's completely impractical as
a way of determining primality, and I'm certain that Gerry knew this.

(2) Learn some elementary number theory before trying to crack RSA.

Mark



More information about the Python-list mailing list