[algogeeks] Re: Sum of Gaussian factor

2007-06-27 Thread mukesh tiwari
ya you are right . this is project euler problem . until now i have found that i can determine how many devisiors of number in sqrt(n) but what are the divisiors above aqrt(n) i am not able to determine. if sqrt(n) is perfect square and there are k factors upto sqrt(n) then total number of

[algogeeks] Re: Sum of Gaussian factor

2007-06-27 Thread Lego Haryanto
Well speaking about number of divisors of n ... all you need to do is to find the prime factorization of n. An example: n = 12, which is 2x2x3. As you can see, there are 2 prime factors, one appears 2 times, and the other appears 1 time. So, the number of divisors will be: (2+1) * (1+1) = 3 x