Decomposition into prime factors

### 7.1.4 Decomposition into prime factors

The ifactor command factors an integer into its prime factors. (Note that a prime factor of a Gaussian integer is only determined up to a factor of ±1 or ±i.)

- ifactor takes n, an integer or a list of integers.
- ifactor(n) returns n in factored form (or a list of the integers in factored form).

#### Examples

ifactor(90)

5· 2· 32 |  |  |  |  |  |  |  |  |  |

ifactor(-90)

−5· 2· 32 |  |  |  |  |  |  |  |  |  |

ifactor(14+23*i)

i | ⎛ ⎝ | 2−i | ⎞ ⎠ | 2 | ⎛ ⎝ | 5+2 i | ⎞ ⎠

ifactor([36,52])

| ⎡ ⎣ | 22· 32,13· 22 | ⎤ ⎦