# Generating function for the divisor function

Earlier today on MathWorld (see eq. 17) I ran across the following expression, which gives a generating function for the divisor function $\sigma_k(n)$: $$\sum_{n=1}^{\infty} \sigma_k (n) x^n = \sum_{n=1}^{\infty} \frac{n^k x^n}{1-x^n}. \tag{1}$$

(The divisor function $\sigma_k(n)$ is defined by $\sigma_k(n) = \sum_{d|n} d^k$.)

How would one go about proving Equation (1)?

(For reference, I ran across this while thinking about this question asked earlier today. The sum in that question is a special case of the sum on the right side of Equation (1) above.)

-

$$\sum_{n=1}^{\infty}\sigma_{k}(n)x^{n}=\sum_{n=1}^{\infty}x^{n}\sum_{d|n}d^{k}=\sum_{d=1}^{\infty}d^{k}\sum_{n:\ d|n}^{\infty}x^{n}.$$ From here, applying the formula for the geometric series, we find that the above equals $$\sum_{d=1}^{\infty}d^{k}\sum_{n=1}^{\infty}x^{nd}=\sum_{d=1}^{\infty}d^{k}\frac{x^{d}}{1-x^{d}}.$$
Such a generating series is known as a Lambert Series. The same argument above proves that for a multiplicative function $f$ with $f=1*g$ where $*$ represents Dirichlet convolution, we have $$\sum_{n=1}^\infty f(n)x^n =\sum_{k=1}^\infty \frac{g(k)x^k}{1-x^k}.$$
I don't think $f$ and $g$ even have to be multiplicative for that identity to hold. –  Greg Martin Jan 9 '13 at 6:12