Consider the below $q$-series identity. One of the things I like about this expansion is how nicely the difference on the left hand side factors to the right hand side of the equation.


$$\prod\_{k\geq1}(1+q^k)^3-\prod\_{k\geq1}(1+q^{3k})
=3q\prod\_{n\geq1}(1+q^n)(1+q^{9n})^2(1+q^n+q^{2n}+\cdots+q^{8n}).$$


I have a "not-so-neat" proof, so



> 
> **QUESTION.** Can you provide a "nifty" justification? *Caveat: you decide what is "nifty"*.
> 
> 
> 



Looking for a "clever" argument for a $q$-series identity
Here's a proof that indicates a systematic method for proving such identities. Let $\eta(z) = q^{1/24} \prod\_{n=1}^{\infty} (1-q^{n})$, with $q = e^{2 \pi i z}$. The identity you state in the equation is the same as
$$
 \frac{\eta^{3}(2z)}{\eta^{3}(z)} - \frac{\eta(6z)}{\eta(3z)} = 3 \frac{\eta(2z) \eta^{2}(18z)}{\eta^{2}(z) \eta(9z)}.
$$
Replacing $z$ with $2z$ and multiplying by $\eta(2z) \eta(4z) \eta^{2}(6z)$ gives the equivalent
$$
 \frac{\eta^{4}(4z) \eta^{2}(6z)}{\eta^{2}(2z)} - \eta(2z) \eta(4z) \eta(6z) \eta(12z) = 3 \frac{\eta^{2}(4z) \eta^{2}(6z) \eta^{2}(36z)}{\eta(2z) \eta(18z)}.$$
Results about $\eta(z)$ in [Gordon and Hughes - Multiplicative properties of $\eta$-products. II](https://doi.org/10.1090/conm/143/01008), and Ligozat - Courbes modulaires de genre 1 ([MR](https://mathscinet.ams.org/mathscinet-getitem?mr=422158)) guarantee that each of the three terms in the above equation are in the space of weight $2$ cusp forms for the group $\Gamma\_{0}(72)$. This space has dimension $5$, and if $f = \sum\_{n=1}^{\infty} a\_{n} q^{n}$ is a function in the space with $a\_{1} = a\_{2} = \dotsb = a\_{7} = 0$, it follows that $f = 0$. It suffices to verify that the coefficients of $q^{1}$ through $q^{7}$ are the same for the two sides of the equivalent identity above.


