divisor function sigma

Calculate the divisor function sigma_k(n) for positive integer n

sigma(n,0) is equal to divisor_count(n)
sigma(n,1) is equal to sum(divisors(n))
sigma(n,k) is equal to sum([x**k for x in divisors(n)])

Default for k is 1.

References
==========

- http://en.wikipedia.org/wiki/Divisor_function
Actually, now that I see what this does, you really don't need it. You can just use summation, which will compute the exact same thing, and you won't duplicate any code.