Euler's Pentagonal Numbers Theorem/Corollary 2

Theorem
Let $n \in \Z_{>0}$ be a strictly positive integer.

Let $p \left({n}\right)$ denote the number of partitions on $n$.

Then:
 * $\displaystyle p \left({n}\right) = \sum_{1 \mathop \le n - GP_k \mathop < n} -\left({-1}\right)^{\left\lceil{k / 2}\right\rceil} p \left({n - GP_k}\right) + \left[{\exists k \in \Z: GP_k = n}\right]$

where:
 * $\left \lceil{k / 2}\right\rceil$ denotes the ceiling of $k / 2$
 * $GP_n$ denotes the $n$th generalized pentagonal number
 * $\left[{\exists k \in \Z: GP_k = n}\right]$ is Iverson's convention.