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
No.  You shouldn't add local variables as class attributes!