IntegerFactorizationPackage I

intfact.spad line 310 [edit on github]

This Package contains basic methods for integer factorization. The factor operation employs trial division up to 10, 000. It then tests to see if n is a perfect power before using Pollards rho method. Because Pollards method may fail, the result of factor may contain composite factors. We should also employ Lenstra's elliptic curve method.

BasicMethod: I -> Factored I

BasicMethod(n) returns the factorization of integer n by trial division

factor: I -> Factored I

factor(n) returns the full factorization of integer n

PollardSmallFactor: I -> Union(I, failed)

PollardSmallFactor(n) returns a factor of n or “failed” if no one is found

squareFree: I -> Factored I

squareFree(n) returns the square free factorization of integer n