Being an absolute dummy in Theory of Number for me ***c'est fantastique*** that brent() works =)
PS 1. Values of magic parameters c = 11 and m = 137 almost don't matter. Usually they choose c = 2 (what about to run brent() in parallel with different values of "c" waiting for "n" is cracked?) 2. Before calling brent() "n" should be tested for its primality. If it is a prime brent(n) may freeze for good. 3. > A better place to publish this code would be the Python Cookbook: It requires a tedious registration etc. Gabriel, don't you mind to publish the code there by yourself? In the long run, it is an invention by Richard Brent (b.1946) =) I just rewrote it to Python from a pseudo-code once available in Wiki but which for some vague reason was later on removed from there. -- http://mail.python.org/mailman/listinfo/python-list