# generating function for the number of partitions of n in which each odd part can occur any number of times but each even part can occur at most twice

Write down the generating function for the number of partitions of $$n$$ in which each odd part can occur any number of times but each even part can occur at most twice. Apply algebra to this generating function to complete the following theorem:

The number of partitions of n in which each odd part can occur any number of times but each even part can occur at most twice is the number of partitions of n in which...

The generating function I've found for the first part is $$\prod_{k\geq1}\frac{(1+x^{2k})^2}{1-x^{2k-1}}$$ but I'm unsure how to start the second part, any help would be appreciated.

The generating function for the first part is $$\begin{eqnarray*} \prod_{n=1}^{\infty} \frac{ (1+x^{2n}+x^{4n})}{1-x^{2n-1}}. \end{eqnarray*}$$ The terms in the numerator deal with the even numbers occuring at most twice & the terms in the denominator deal with the odd numbers.
Now observe that $$\begin{eqnarray*} 1+x^{2n}+x^{4n} = \frac{ 1-x^{6n} }{ 1-x^{2n} }. \end{eqnarray*}$$ The generating function can be rewritten as $$\begin{eqnarray*} \prod_{n=1 \text{ and } 6 \nmid n }^{\infty} \frac{ 1}{1-x^{n}}. \end{eqnarray*}$$ So it is the same as partitioning numbers whose parts are not multiples of $$6$$.