Algorithm for extracting the prime factors of an integer

P_spam_ at P_spam_ at
Thu Jan 2 13:05:41 CET 2003

Luca Bruderer wrote:
> Hi
> I'm wondering which is the best algorithm to do this.

Erm there is some deep math involved with this.
I would suggest "prime factorization" in google.

This works on linux at least :-)

os.popen("factor 1234").readline().split()[1:]


More information about the Python-list mailing list