By telescoping products
and is the generating function for the sequence , where the first terms are .
Multiply both sides by :
Subtract the second equation from the first:
Solution: The sum of all divisors of is given by
as can be seen by expanding the brackets. The number has positive divisors, and their arithmetic mean is
If and are both odd, then when and ,
If , choose and .
Then . (And similarly if ).