TITLE: an identity related to the pentagonal numbers
QUESTION [6 upvotes]: How can I prove the following?
$$1-x+x^2+x^5-x^7-x^{12}+x^{15}-x^{22}-x^{26}+x^{35}-x^{40}+\dots \\=  \prod_{i=1}^{\infty} [(1 - x^{8 i - 7}) (1 + x^{8 i - 6}) (1 + x^{8 i - 5}) (1 + 
    x^{8 i - 4}) (1 + x^{8 i - 3}) (1 + x^{8 i - 2}) (1 - 
    x^{8 i - 1}) (1 - x^{8 i})]$$
It doesn't seem to follow from the Triple Product formula and I haven't been able to come up with a combinatorial proof.

REPLY [14 votes]: This is an instance of Watson's quintuple product identity (also Macdonald identity for $BC_1$):
$$\prod_{n\geq 1}(1-s^n)(1-s^nt)(1-s^{n-1}t^{-1})(1-s^{2n-1}t^2)(1-s^{2n-1}t^{-2})=\sum_{n\in \mathbb Z}s^{\frac{3n^2+n}{2}}(t^{3n}-t^{-3n-1}).$$
By plugging in $t=x^{-1}$ and $s=-x^{4}$ this becomes exactly your identity.
Somewhat amusingly, the quintuple product identity can be proven directly from the triple product identity. See this article by Carlitz, or this article of Foata and Han.