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'm looking for a formula to calculate the product of all proper divisors of a number number $n$. Any idea?

Thanks,
Chan

share|improve this question
1  
If $d_1|n$ so does $\frac{n}{d_1}$. So this essentially boils down to counting the number of divisors. Do you count the $\sqrt{n}$ twice if $n$ is a perfect square? –  user17762 Feb 28 '11 at 1:35
    
@Sivaram Ambikasaran: Sorry, I'm really not sure, but I believe it should be. Very good point! –  Chan Feb 28 '11 at 1:41
    
add comment

1 Answer

up vote 7 down vote accepted

Like Sivaram points out. If $n$ is not a perfect square, then every divisor $d_1$ can be paired with the divisor $\frac{n}{d_1}$, which is distinct from $d_1$; the product of these two is $n$. So the product of all divisors is equal to $n^k$, where $2k$ is the number of divisors. (Note that a positive integer has an odd number of distinct divisors if and only if it is a square).

If $n$ is a perfect square, then it will have $2k+1$ divisors for some $k$; the product will be $n^k\times\sqrt{n} = n^{k+\frac{1}{2}}$.

Either way, the answer is $n^{d(n)/2}$, where $d(n)$ is the number of divisors of $n$ (sometimes written $\sigma_0(n)$ or $\tau(n)$).

If you want the proper divisors, then you are excluding $n$ from the product, so the answer becomes $n^{(d(n)/2) - 1}$.

share|improve this answer
    
@lhf: Wouldn't it make more sense to have this as a comment to the original question? –  Arturo Magidin Feb 28 '11 at 1:46
    
Thanks, I got it. –  Chan Feb 28 '11 at 1:48
add comment

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.