This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Mathematical Functions / Number Theory  /

  • FactorInteger[ n ] gives a list of the prime factors of the integer n, together with their exponents.
  • Example: FactorInteger[2434500].
  • For negative numbers, the unit {-1, 1} is included in the list of factors.
  • FactorInteger also works on rational numbers. The prime factors of the denominator are given with negative exponents.
  • FactorInteger[ n , GaussianIntegers->True] factors over Gaussian integers.
  • When necessary, a unit of the form {-1, 1}, {I, 1} or {-I, 1} is included in the list of factors.
  • FactorInteger[ n , FactorComplete->False] does fast but not necessarily complete factorization, and extracts only factors that are easy to find.
  • See the Mathematica book: Section 1.1.3, Section 1.4.8Section 3.2.4.
  • See also Implementation NotesA.9.44.7MainBookLinkOldButtonDataA.9.44.7.
  • See also: Prime, PrimeQ, Divisors.
  • Related package: NumberTheory`FactorIntegerECM`.

    Further Examples

    Here is the prime factorization of a 9-digit number.



    The number is not a prime for for .



    A prime over the integers may factor in the Gaussian integers.