# Distributing problem using generating functions

For $r\in\mathbb{Z^*}$, let $a_r$ denote the number of ways to distribute $r$ identical objects into $3$ identical boxes, $b_r$ be the number of distributions so that the boxes are to be non-empty, and $c_r$ be the number of distributions such that the box containing the least number of objects has an even number of objects. Hence, find the generating functions for $\left(a_r\right)$, $\left(b_r\right)$ and $\left(c_r\right)$.

ATTEMPT

The number of ways to distribute $r$ identical objects into $3$ identical boxes is equivalent to the number of partitions of the integer $r$ into at most $3$ parts, which in turn equals to the number of partitions of $r$ such that the largest part is less than or equal to $3$. Hence, we have the following generating function for $\left(a_r\right)$ \begin{align} &\left(1+x+x^2+\cdots\right)\left(1+x^2+x^4+\cdots\right)\left(1+x^3+x^6+\cdots\right)\\ =&\dfrac{1}{1-x}\cdot\dfrac{1}{1-x^2}\cdot\dfrac{1}{1-x^3} \end{align} Suppose the boxes have to be non-empty, then we have to find the number of partitions of $r$ such that the largest part is equal to $3$. Hence, we have the following generating function for $\left(b_r\right)$ \begin{align} &\left(1+x+x^2+\cdots\right)\left(1+x^2+x^4+\cdots\right)\left(x^3+x^6+\cdots\right)\\ =&\dfrac{1}{1-x}\cdot\dfrac{1}{1-x^2}\cdot\dfrac{x^3}{1-x^3} \end{align} I'm stuck with finding the generating function for $\left(c_r\right)$, I know the answer is \begin{align} &\left(1+x+x^2+\cdots\right)\left(1+x^2+x^4+\cdots\right)\left(1+x^6+x^{12}+\cdots\right)\\ =&\dfrac{1}{1-x}\cdot\dfrac{1}{1-x^2}\cdot\dfrac{1}{1-x^6} \end{align} but I don't really know the reasoning behind it. Any help would be appreciated.