Algorithm for extracting the prime factors of an integer

Frank Buss fb at frank-buss.de
Sat Dec 28 16:52:12 EST 2002


"Luca Bruderer" <luca.bruderer at bluewin.ch> wrote:

> I know the mathematics behind it, as I said, I was just wondering
> about a better solution in python because I usually use this language.

Probably you don't know all the nice algorithms for prime factorization:

http://mathworld.wolfram.com/PrimeFactorizationAlgorithms.html

the best one depends on your number (or set of numbers), which you want to 
factorize. Then you can think about how to implement it in Python.

-- 
Frank Buß, fb at frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de



More information about the Python-list mailing list