$p^{2 \times}(n)=p^{3k\pm1}(n)$, $n \in \mathbb{N}$
$p^{2 \times}(n),$ where $n\in\mathbb{N},$ is the number of the partitions of $n$ such that each number can appear as at most two summands.
$p^{3k\pm1}(n),$ where $n\in\mathbb{N},$ is the number of partitions of $n$ where each summand is not divisible by $3.$
I know that I should find the generating functions in both cases, but I still don't know how does it work in this special case
The generating function for $p^{2 \times}(n)$ is given by \begin{eqnarray*} \sum_{n=0}^{\infty} p^{2 \times}(n) x^n = \prod_{i=1}^{\infty} (1+x^{i}+x^{2i}). \end{eqnarray*} The generating function for $p^{3k\pm1}(n)$ is given by \begin{eqnarray*} \sum_{n=0}^{\infty} p^{3k\pm1}(n) x^n = \prod_{i=1}^{\infty} \frac{1}{(1-x^{3i-2})}\prod_{i=1}^{\infty} \frac{1}{(1-x^{3i-1})}. \end{eqnarray*} To observe that these are equal, rearrange the terms in the first product as follows \begin{eqnarray*} & & \prod_{j=1, 3 \nmid j }^{\infty} \, \,\prod_{k=0}^{\infty}(1+x^{j3^{k}}+x^{2j3^{k}}) \\ &=&\prod_{j=1, 3 \nmid j }^{\infty} (1+x^{j}+x^{2j}+x^{3j}+x^{4j}+\cdots ) \\ &=&\prod_{j=1, 3 \nmid j }^{\infty} \frac{1}{(1-x^{j})}. \end{eqnarray*}