Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I've been trying to find / generate a formula for the following problem:

  • Given a number, how many positive integers are factors of this number.

In practice, you could simply build a table as such (lets assume the number is 36):

1 | 36
2 | 18
3 | 12
4 | 9
6 | 6

Thus there are 9 positive integers that are factors to 36.

This method seems like it would be taxing if the number was large. So I was thinking that if you knew the prime factorization for a number such as $\,2 \cdot 2 \cdot 3 \cdot 3 = 36, \,$ there should be a formula for the number of unique combinations you can multiply these prime factors together. That's where I am stuck. Thanks in advance!

share|improve this question
1  
    
Well, good thinking. Consider just the power of a prime, let's say 2^5 with factors 2^0, 2^1, 2^2, 2^3, 2^4, 2^5. 6 factors. p^k has (k + 1) factors. If you have multiple primes, each combination of factors of the prime powers gives a unique factor. So 2^2 * 3^2, 3 factors of 4, multiplied by the 3 factors of 9, gives 3 * 3 = 9 factors. –  gnasher729 May 15 at 16:51

3 Answers 3

up vote 2 down vote accepted

Hint: if the prime factorization of $\,n\in\Bbb N\,$ is

$$n=\prod_{k=1}^rp_k^{a_k}$$

then the number of divisors of $\,n\,$ is

$$\prod_{k=1}^r(a_k+1)$$

share|improve this answer
    
Thank you so much! Is there a proof for this I could look at? –  SoulDZIN Feb 5 '13 at 14:49
    
Look at David Pollack's answer to manhattangmat.com/forums/… –  Ross Millikan Feb 5 '13 at 14:57
    
@Ross Millikan Oh! That makes alot of sense! I feel so foolish now... Thanks! –  SoulDZIN Feb 5 '13 at 15:05
    
Another source, on this site, is Rich Decker's answer to math.stackexchange.com/questions/295407/… –  Ross Millikan Feb 5 '13 at 15:22

Consider this: Every positive integer has a unique prime factorisation, so choosing integers is the same as choosing prime factorisations. A prime factorisation divides another prime factorisation if and only if the exponents of each prime in the former are less than or equal to their counterparts in the latter.

So the number of divisors is the number of ways of choosing exponents satisfying that condition. For each prime $p^a$, I can choose any exponent between $0$ and $a$ inclusive – that's $a + 1$ choices. So, in conclusion: if \[n = \prod_{k = 1}^{N} p_k^{a_k}\] then \[\phi(n) = \prod_{k = 1}^N (a_k + 1)\]

share|improve this answer

Let's say you have a number n. Let $n=\ p_1^r.p_2^m.p_3^n$ then the number of positive factors is (r+1)(m+1)(n+1). (I do not know how to make $r_1,r_2$ in exponent, so I used r,m,n. In your case, 36=$2^2.3^3$ so (2+1)(2+1)=9.

share|improve this answer
    
To write $p_1^{r_1}$ you write p_1^{r_1} between dollar signs. –  Daan Michiels Feb 5 '13 at 14:56
    
In general, in $\LaTeX$ if you put something in braces it gets treated as a single character. So if you want $r^{12}$ you need r^{12} instead of r^12, because the latter gives $r^12$ –  Ross Millikan Feb 5 '13 at 14:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.