# Generating functions and integer partitioning [duplicate]

Show that the number of partitions of a positive integer n where no summand appears more than twice is equal to the number of partitions of n where no summand is divisible by 3

So I begin by formulating this problem in terms of generating functions. Let $a(n)$ be the number of partitions of $n$ where no summand appears more than twice and let $b(n)$ be the number of partitions of $n$ where no summand is divisible by $3$.

If I showed that the $a(n)$ and $b(n)$ have the same generating functions then I am done, right ?

Now the generating function for $a(n)$ is $(1+q +q^2)(1 + q^2 + q^4)(1+q^3 + q^6).... = \prod_{i=1}^{\infty} (1 + q^i + q^{2i})$

But now I am stuck here, How can I get the generating function of $b(n)$ ? and how would I show that the generating function of $a(n)$ is the same generating function as $b(n)$ ?