Euler’s Pentagonal Number Theorem on Wikipedia
For convenience, here below is the statement:
Let $n$ be a nonnegative integer, let $q_e(n)$ be the number of partitions of $n$ into even number of distinct parts and $q_o(n)$ - number of partitions of $n$ into odd number of distinct parts. Then $q_e(n) - q_o(n) = \cases{(-1)^k \ \text{ if } n = \frac{k(3k \pm 1)}{2} \\ 0 \text{ otherwise}}$.
I understand the proof all the way up to the point where it says "...in which case there is exactly one Ferrers diagram left over".
According to the proof, integer $12$ has precisely one single non-invertible partition which is $(5, 4, 3)$ and it contributes $(-1)^3$ to the coefficient of $x^{12}.$ Since $12$ is a relatively small integer, the claim could be checked manually (which I admit I hadn't done).
But how do we know the claim in bold holds for horrendously large numbers or in general? Exactly what part of the proof shows the claim in bold? Thanks.
In the notation of that proof, the only non-invertible partitions are those with $m=s$ and those with $m=s+1$, and it’s clear that in each case the value of $m$ uniquely determines a single Ferrers diagram of each type and hence a unique $n$ and partition of that $n$. The only possible problem, then is that there might be some $n$ that had a single non-invertible partition of each type.
This, however, is not actually possible. If $n$ has a partition of the first type, then $n=k^2+\binom{k}2$, where $k$ is the number of parts (i.e., the $s$ of the proof). If $n$ also has a partition of the second type, then $n=\ell^2+\binom{\ell+1}2$, where $\ell$ is again the number of parts. Thus,
$$k^2+\binom{k}2=\ell^2+\binom{\ell+1}2\,,$$
so
$$\frac{k(3k-1)}2=\frac{\ell(3\ell+1)}2\,,$$
and hence $3k^2-k=3\ell^2+\ell$. But then $3(k-\ell)(k+\ell)=\ell+k$, and $k+\ell\ne 0$, so $3(k-\ell)=1$, which is impossible. Thus, $n$ cannot have partitions of both types and therefore can have at most one non-invertible partition.