List of prime factors: ifactors

### 5.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:

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

  since 90=213251.
- Input:
  ifactors(-90)
  Output:

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

- Input:
  ifactors(31+22*i)
  Output:

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

- Input:
  ifactors([36,52])
  Output:

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