# Singular

### 5.1.116 primefactors

`Syntax:`
`primefactors (` int/bigint/number_expression `)`
`primefactors (` int/bigint/number_expression `,` int_expression `)`
`Type:`
list
`Purpose:`
returns the prime factorisation up to an optionally given bound, b, on the prime factors
When called with int(s)/bigint(s), no ring needs to be active.
When called with numbers these are assumed to be integers in a polynomial ring over Q.
The method finds all prime factors of an integer n. n' will contain the sign, be zero, or the rest (when a bound is given) respectively. The returned list contains the following information: The returned list contains the following information:
L[i] = i-th prime factor (in ascending order),
L[i] = multiplicity of L[i],
L = n'
`Example:`
 ``` bigint n = bigint(7)^12 * bigint(37)^6 * 121; primefactors(n); ==> : ==> : ==> 7 ==> : ==> 11 ==> : ==> 37 ==> : ==> : ==> 12 ==> : ==> 2 ==> : ==> 6 ==> : ==> 1 primefactors(n,25); ==> : ==> : ==> 7 ==> : ==> 11 ==> : ==> : ==> 12 ==> : ==> 2 ==> : ==> 2565726409 ```
See prime.

### Misc 