Read · 1 min
The number of (positive integer) factors of a positive integer is denoted by . It is one of the most important arithmetic functions.
There exists a simple formula determining the number of factors of an integer. Or rather, as we usually consider positive factors of positive integers, let's restrain ourselves to positive integers.
To understand the formula, let's consider an example. Suppose we wish to find the number of positive divisors of . To do this, a fast method would be to factorize it and then try to find all possible ways to meld its prime factors into a divisor. Let's carry this out - . This means the divisors are and their doubles, and their quadruples, .
More generally, suppose we have a positive integer with the prime factorization* (Here, the represent different primes and the are some positive integer exponents.)
Any divisor of has the form
where for each . Note that some of the may be . In fact, every number of this form is a divisor of , and such a representation of a divisor is unique*.
Clearly, we may choose these independently of each other, and for each , we may choose to be any of the numbers , hence by the multiplication principle, the number of positive divisors of is precisely
Based on this formula, we may say that the divisor function is multiplicative.
By generalizing this method, we may find a formula for the sum of factors of a positive integer.
*These claims may appear to be intuitively obvious, but it in fact follow from the Fundamental Theorem of Arithmetic (proven here), which asserts that every integer larger than has a unique prime factorization.