This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# FactorInteger

 FactorInteger[n]gives a list of the prime factors of the integer n, together with their exponents. FactorIntegerdoes partial factorization, pulling out at most k distinct factors.
• 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 gives what is left after the partial factorization.
• When necessary, a unit of the form , {I, 1}, or {-I, 1} is included in the list of factors.
Find prime factors and their exponents:
Find prime factors and their exponents:
 Out[1]=

 Out[1]=
 Scope   (2)
FactorInteger threads itself element-wise over lists:
FactorInteger works with rational numbers:
Factor over Gaussian integers:
 Applications   (7)
Find factorizations of numbers of the form :
Display as an explicit product of factors:
Find primes that appear in prime factorization of only to the first power:
Find all natural numbers up to 100 that are primes or prime powers:
The number of distinct factors of successive numbers:
The highest power of a prime in numbers up to 100:
The number of factors with Gaussian integers allowed:
Timings can increase rapidly and unpredictably with the size of the input: