Factorization of an integer is a common tasks in number theory. NZMATH provides the functionality and some related functions in the factor module.
Factorization of an integer is a common tasks in number theory. factor is the general method in NZMATH. It takes an integer argument n.
Returned value is a list of list, where an inner list consists of a prime and its exponent.
Note that since factorization is the most well-known time consuming task, the call may time-out.
There are some functions depending on factorization.
The first one is primePowerTest, which judges whether n is of the form pk with a prime p or not.
Returned value is a boolean.
The function allDivisors returns all factors divide n.
Returned value is a list of divisors of n>.
The function primeDivisors returns prime factors divide n.
Returned value is a list of prime divisors of n>.
The last function squarePart returns the largest integer whose square divides n.
Returned value is an integer.