gives a list of the prime factors of the integer n, together with their exponents.

FactorInteger[n, k]
does partial factorization, pulling out at most k distinct factors.

Details and OptionsDetails and Options

  • For negative numbers, the unit is included in the list of factors.
  • FactorInteger also works on rational numbers. The prime factors of the denominator are given with negative exponents. »
  • The last element in the list FactorInteger[n, k] gives what is left after the partial factorization.
  • FactorInteger[n, GaussianIntegers->True] factors over Gaussian integers. »
  • FactorInteger[m+I n] automatically works over the Gaussian integers.
  • When necessary, a unit of the form , {I, 1}, or {-I, 1} is included in the list of factors.
  • FactorInteger[n, Automatic] pulls out only factors that are easy to find.
  • FactorInteger uses PrimeQ to determine whether factors are prime.
New in 1 | Last modified in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »