# Obtaining the number of factors from prime factorization

## Main Question or Discussion Point

Hi! How do I determine the number of distinct factors of a number, say, 2520?
2520 = 2*2*2*3*3*5*7
So we've 8 different primes. The number of combinations of those is, according to me:
C(8,1)+C(8,2)+...+C(8,8)=155 (I think, calculated it by hand; but it isn't important)
Obviously those aren't distinct. (Pick the fist 2 and the second 2 = 4, but pick the second 2 and the third 2 also = 4.) :yuck:

HallsofIvy
Homework Helper
I don't understand what you are doing. 2520= 2*2*2*3*3*5*7 has 4 distinct prime factors, not "8 different primes". And I don't see what being "prime factors" has to do with number of combinations. Are you asking "of those 8 numbers (not all distinct) how many combinations can I make"? Wouldn't that be the same as asking "of the 8 letters "aaabbcd", how many different combinations can I make?" There are only 3 different one letter combinations: "a", "b", and "c", not C(8,1)= 8.

Isn't the combinations of the prime factors = all factors?
I mean, i pick 2*2 (a product of the primes in the positions specified by the combination) or 12
i pick 2*2 or 23
i pick 2*3 or 24

and so on.
Do you see?

lurflurf
Homework Helper
danne89 said:
Hi! How do I determine the number of distinct factors of a number, say, 2520?
2520 = 2*2*2*3*3*5*7
So we've 8 different primes. The number of combinations of those is, according to me:
C(8,1)+C(8,2)+...+C(8,8)=155 (I think, calculated it by hand; but it isn't important)
Obviously those aren't distinct. (Pick the fist 2 and the second 2 = 4, but pick the second 2 and the third 2 also = 4.) :yuck:
This is a special case of the divisor functions studied in number theory where you sum the kth power of the divisors.
In this case the 0th power.
p1^n1*p2^n2*p3^n3*...*pk^nk*...
a general factor (including improper ones) is
p1^m1*p2^m2*p3^m3*...*pk^mk*...
where pk is a prime and 0<=mk<=nk
Thus the number of such factors is
(1+n1)(1+n2)(1+n3)...(1+nk)...
In particular 1 has one factor and and p^n (p prime) has n+1
2520 has 4*3*2*2=48