Generalizations of the pentagonal number theorem Euler's pentagonal number theorem (see also the original paper and review by Jordan Bell) states
$$
\prod_{n=1}^\infty (1 - q^n) = \sum_{k=-\infty}^{\infty} (-1)^{k} q^{(3k^2 - k)/2},
$$
where $k \, (3k - 1)/2$ is the $k$th pentagon number.
It seems that we can generalize this to higher polygonal numbers, that is, for $t \ge 2$, we have
$$
(1-q)\prod_{n=1}^\infty(1-q^{nt - 1})(1-q^{nt})(1-q^{nt + 1})
=
\sum_{k=-\infty}^{\infty}
(-1)^k q^{k \, (t \, k + 2-t)/2},
$$
where $k \, (t \, k + 2 - k)/2$ is the $(t+2)$-gonal number.
Examples
For $t = 2$, it becomes,
\begin{align}
(1-q)^2 (1-q^2) (1-q^3)^2 (1-q^4) \cdots = 1 + 2 \sum_{k=1}^\infty (-1)^k q^{k^2}
\\
=1 - 2 \, q + 2 \, q^4 - 2 \, q^9 + 2 \, q^{16} - 2 \, q^{25} + 2 \, q^{36}
- 2 \, q^{49} + \cdots
\end{align}
For $t = 3$, we recover Euler's pentagonal number theorem
$$
(1-q) (1-q^2) (1-q^3) \cdots = 1 - q - q^2 + q^5 + q^7 - q^{12} - q^{15} + q^{22}  + \cdots.
$$
For $t = 4$, we have
\begin{align}
(1-q) \cdot (1-q^3) (1 - q^4) (1 - q^5)
\cdot (1 - q^7) (1 - q^8) (1 - q^9) \cdots \\
= 1 - q - q^3 + q^6 + q^{10} - q^{15} - q^{21} + q^{28} + q^{36} + \cdots.
\end{align}
For $t = 5$, we have
\begin{align}
(1-q) \cdot (1-q^4) (1 - q^5) (1 - q^6)
\cdot (1 - q^9) (1 - q^{10}) (1 - q^{11}) \cdots \\
= 1 - q - q^4 + q^7 + q^{13} - q^{18} - q^{27} + q^{34} + q^{46} + \cdots.
\end{align}
I suppose that this is an established theorem. Can any one tell me more about this?  Is it some special case of some general theorem?  Or, are there general proofs, and further extensions?  Thank you!

It turns out that it follows directly from the Jacobi triple product identity:
\begin{align}
\prod_{n=0}^\infty
(1 - x^{2n+2}) (1 + x^{2n+1} z) \left(1 + x^{2n+1}z^{-1}\right)
=
\sum_{n=-\infty}^{\infty}
x^{n^2} \, z^n.
\tag{1}
\end{align}
With $x = q^{t/2}$ and $z = -q^{1-t/2}$, the left hand side becomes
\begin{align}
& \prod_{n=0}^\infty
\left(1 - q^{tn+t}\right)
\left(1 - q^{tn+t/2+1-t/2} \right)
\left(1 - q^{tn+t/2-1+t/2}\right)
\\
&=
\prod_{n=0}^\infty
\left(1 - q^{t(n+1)}\right) \left(1 - q^{tn+1} \right) \left(1 - q^{t(n+1)-1}\right)
\\
&=
(1-q) \prod_{n=1}^\infty
(1 - q^{tn}) (1 - q^{tn+1} ) (1 - q^{tn-1}).
\tag{2}
\end{align}
The right hand side becomes $(-1)^n \, q^{tn^2/2+n-nt/2}$, which proves the desired identity.

Proof
I shall take the chance to give a direct proof adapted from Andrews' proof for the triplet product identity, see also this post.
We first state two identities that can be proved by combinatorics.
\begin{align}
\prod_{i=0}^\infty (1 - u^i \, v)
&= \sum_{k = 0}^\infty
\frac{ (-1)^k u^{k(k-1)/2} v^k }{ (1 - u) (1 - u^2) \cdots (1 - u^k)},
\tag{3}
\\
\prod_{i=1}^\infty \frac{1}{(1 - u^i \, v)}
&= \sum_{k = 0}^\infty
\frac{ (u \, v)^k }{ (1 - u) (1 - u^2) \cdots (1 - u^k)},
\tag{4}
\end{align}
Using Eq. (3) for $u = q^t, v = q$, we get
\begin{align}
\prod_{n=0}^\infty (1-q^{tn+1})
&=
\sum_{k = 0}^\infty
\frac{ (-1)^k \, q^{t k (k - 1)/2 + k} }
{(1-q^t) (1 - q^{2t}) \cdots (1 - q^{kt}) }
\\
&=
\sum_{k = 0}^\infty
\frac{ (-1)^k \, q^{t k (k - 1)/2 + k} (1 - q^{(k+1)t}) (1 - q^{(k+2)t}) \cdots }
{(1-q^t) (1 - q^{2t})\cdots (1 - q^{kt})
(1 - q^{(k+1)t}) (1 - q^{(k+2)t}) \cdots }
\\
&=
\frac{ 1 } { \prod_{n=1}^\infty (1-q^{nt}) }
\sum_{k = 0}^\infty (-1)^k
q^{t k (k - 1)/2 + k} \left[(1 - q^{(k+1)t}) (1 - q^{(k+2)t}) \cdots \right]
\end{align}
At this point we note that if the product in the square brackets
starts from $k \le -1$, it will encounter a factor $(1 - q^0) = 0$
and thus contributes nothing to the sum.  This means that it is harmless to extend the sum to negative $k$.
\begin{align}
\prod_{n=0}^\infty (1-q^{tn+1})
&=
\frac{ 1 } { \prod_{n=1}^\infty (1-q^{nt}) }
\sum_{k = -\infty}^{+\infty} (-1)^k
q^{t k (k - 1)/2 + k} \left[(1 - q^{(k+1)t}) (1 - q^{(k+2)t}) \cdots \right].
\end{align}
Now use again Eq. (3) for the product in the square brackets with $u = q^t, v = q^{(k+1)t}$, we get
\begin{align}
\prod_{n=0}^\infty (1-q^{tn+1})
&=
\frac{ 1 } { \prod_{n=1}^\infty (1-q^{nt}) }
\sum_{k = -\infty}^{+\infty}
(-1)^k \, q^{t \, k (k - 1)/2 + k}
\sum_{l = 0}^\infty
\frac{ (-1)^l q^{t \, l(l-1)/2 + (k+1)\, l \, t}}
{(1 - q^t) \, \cdots (1 - q^{lt}) } \\
&=
\frac{ 1 } { \prod_{n=1}^\infty (1-q^{nt}) }
\sum_{l = 0}^\infty
\frac{ q^{l \, (t - 1)}  }
{(1 - q^t) \, \cdots (1 - q^{lt}) }
\sum_{k = -\infty}^{+\infty}
(-1)^{k + l} \, q^{t \, (k+l)^2/2 - t(k+l)/2 + (k+l)},
\end{align}
where we have changed the order of summation in the second step.
The inner sum over $k$ can be done in terms of $m = k+l$ from $-\infty$ to $\infty$.
The outer sum over $l$ can be converted to a product by Eq. (4) with $u = q^t, v = q^{-1}$, so
\begin{align}
\prod_{n=0}^\infty (1-q^{tn+1})
&=
\frac{ 1 } { \prod_{n=1}^\infty (1-q^{nt}) }
\frac{1}{ \prod_{j = 1}^\infty  (1-q^{jt-1}) }
\sum_{m = -\infty}^{+\infty}
(-1)^m \, q^{t \, m^2/2 - t m/2 + m}.
\end{align}
Multiplying the two products on the denominator yields the desired result.
