6.5.5 List of prime factors: ifactors
The ifactors command decomposes an integer into prime
factors.
-
ifactors takes one argument:
n, an integer or a list of integers.
- ifactors(n) decomposes the integer n (or the integers
of the list) into prime factors, given as a list (or
a list of lists) in which each prime factor is followed by its
multiplicity.
Examples.
-
Input:
ifactors(90)
Output:
since 90=213251.
- Input:
ifactors(-90)
Output:
- Input:
ifactors(31+22*i)
Output:
- Input:
ifactors([36,52])
Output: