List of prime factors

### 7.1.5 List of prime factors

The ifactors command decomposes an integer into prime factors.

- ifactors takes 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

ifactors(90)

| ⎡ ⎣ | 2,1,3,2,5,1 | ⎤ ⎦

since 90=21· 32· 51.

ifactors(-90)

| ⎡ ⎣ | −1,1,2,1,3,2,5,1 | ⎤ ⎦

ifactors(31+22*i)

| ⎡ ⎣ | i,1,2−i,1,4−i,2 | ⎤ ⎦

ifactors([36,52])

⎡ ⎢ ⎣ |
2 | 2 | 3 | 2
2 | 2 | 13 | 1
| ⎤ ⎥ ⎦