In number theory, the prime factors of a positive integer are the prime numbers that divide that integer exactly. The prime factorization of a positive integer is a list of the integer's prime factors, together with their multiplicities; the process of determining these factors is called integer factorization. The fundamental theorem of arithmetic says that every positive integer has a single unique prime factorization.
To shorten prime factorizations, factors are often expressed in powers (multiplicities). For example,
in which the factors 2, 3 and 5 have multiplicities of 3, 2 and 1, respectively.
For a prime factor p of n, the multiplicity of p is the largest exponent a for which pa divides n exactly.
For a positive integer n, the number of prime factors of n and the sum of the prime factors of n (not counting multiplicity) are examples of arithmetic functions of n that are additive but not completely additive.
Perfect square numbers can be recognized by the fact that all of their prime factors have even multiplicities. For example, the number 144 (the square of 12) has the prime factors
These can be rearranged to make the pattern more visible:
Because every prime factor appears an even number of times, the original number can be expressed as the square of some smaller number. In the same way, perfect cube numbers will have prime factors whose multiplicities are multiples of three, and so on.
Positive integers with no prime factors in common are said to be coprime. Two integers a and b can also be defined as coprime if their greatest common divisor gcd(a, b) = 1. Euclid's algorithm can be used to determine whether two integers are coprime without knowing their prime factors; the algorithm runs in a time that is polynomial in the number of digits involved.