## Number of Divisors

Jun 7, 2009http://en.wikipedia.org/wiki/Divisor_function

to calc number of divisors of X:

- found all prime factors of X and number of each factors: X = f1^a1 * f2^a2 * f3^a3 ……
- number of divisors = (a1 + 1) * (a2 + 1) * (a3 + 1) * …