If n = (p0^a0)*(p1^a1)….

where pi is a prime

then sum of divisors of n is given by

SOD(n) = (p0^0+p0^1+…+p0^a0) *( p1^0+p1^1+…p1^a1)*…

= (p0^(a0+1)-1) / (p0-1) * (p1^(a1+1)-1) / (p1-1))* …

Skip to content
# Sum of Divisors

# Hello!

If n = (p0^a0)*(p1^a1)….

where pi is a prime

then sum of divisors of n is given by

SOD(n) = (p0^0+p0^1+…+p0^a0) *( p1^0+p1^1+…p1^a1)*…

= (p0^(a0+1)-1) / (p0-1) * (p1^(a1+1)-1) / (p1-1))* …