Q:

Generating function for the partition function

Could someone explain what is the reasoning behind the following equality? Or maybe direct me to a proof of the following equality?
$$\sum_{n=0}^{\infty}p(n)x^n = \prod_{k=1}^{\infty}(1-x^k)^{-1}$$ where $\sum_{n=0}^{\infty}p(n)x^n$ is the generating function for the partition function. 

A:

For the basic generating functions in term of $(1 - x^k) ^ {-1}$, we can write them out as a infinite sum.
$(1 - x) ^ {-1}$ = $1 + x + x^2 + x^3 + ....$
$(1 - x^2) ^ {-1}$ = $1 + x^2 + x^4 + x^6....$
$(1 - x^3) ^ {-1}$ = $1 + x^3 + x^6 + x^9....$
and so on.
So $\prod(1 - x^k) ^ {-1}$ is just an infinite product of 
($1 + x + x^2 + x^3 + ....$)( $1 + x^2 + x^4 + x^6....$)($1 + x^3 + x^6 + x^9....$)....
The for each power term $x^n$, there is a corresponding coefficient p(n). And we need to sum up all these power terms.

