For odd values of M the divisors can be grouped in couples such that
sum of logs in each couple will be M:
1,10^M; 2, 10^M/2;....d, 10^M/d.
Clearly there are .5*(M+1)^2 couples, so
For even values of M the formula is slightly different, but it is immaterial now.
Edited on August 1, 2014, 3:09 pm