# Generating function for partition function

The following formula holds for $|x|<1$: $$\displaystyle\sum_{k=0}^{\infty} p(k) x^k = \displaystyle\prod_{k=1}^{\infty} \dfrac{1}{1-x^n}=\dfrac{1}{\displaystyle\sum_{k=-\infty}^{\infty}(-1)^k x^{\frac{k(3k+1)}{2}}},$$ where $p(k)$ denotes the partition function.