---
tag: 0578PA53VA
kind: statement
role: theorem
name: Generating function for partitions
msc: [11P81]
uses: [001CX45SWQ, 0HH6JX5WZZ]
sources:
  - url: https://en.wikipedia.org/wiki/Partition_function_(number_theory)
    locator: Generating function
---

## Statement

Let $p(n)$ be the [[partition function|001CX45SWQ]].
Then, as formal power series in $\mathbb{Z}[\![x]\!]$,
$$\sum_{n \ge 0} p(n)\, x^n = \prod_{k \ge 1} \frac{1}{1 - x^k}.$$

## Remarks

The infinite product makes sense, because each coefficient of the product depends only on finitely many factors.
Proof idea: the factor $\frac{1}{1 - x^k} = 1 + x^k + x^{2k} + \dots$ chooses how many parts equal $k$.
Restricting the factors gives other results. For example, $\prod_{k \ge 1} (1 + x^k)$ counts partitions into distinct parts. This gives [[Euler's partition theorem|0XFZ1BMF5Q]].

## Explanations

### L1 human

Each factor of the product decides how many times a part $k$ appears in the partition.
Multiplying the factors combines these choices, and the coefficient of $x^n$ counts the choices with total $n$.
