If I denote by $p(\lambda)$ the number of different parts of $\lambda$ and by $s(\lambda)$ the smallest nonzero part of $\lambda$ (when $\lambda\neq\varnothing$ of course), then why does the following combinatorial identity fall out? $$ 1+\sum_{\lambda\neq\varnothing}(-1)^{s(\lambda)-1}\binom{p(\lambda)-1}{s(\lambda)-1}q^{|\lambda|}x^{l(\lambda)}=\sum_{n\geq 0}(-1)^nx^nq^{(3n^2+n)/2}\prod_{i=1}^n\frac{1}{1-q^i}\prod_{i=n+1}^\infty\frac{1}{1-xq^i}. $$
It looks very difficult to prove algebraically, so I was thinking there must be some counting argument to establish the equality. Thanks.