Q: Find the number of ways to select 2n balls from n identical blue balls, n identical red balls and n identical white balls, where n $\in$ $\mathbb N$.
My working:
$(x+x^2+x^3+...)^3$
$=x^3(1+x+x^2+...)^3$
$= x^3 \sum_{r=0}^\infty \begin{pmatrix} {r+3-1}\\{r}\end{pmatrix}x^r$
$= \sum_{r=0}^\infty \begin{pmatrix} {r+2}\\{r}\end{pmatrix}x^{3+r}$
Hence the number of ways is $\begin{pmatrix} {2n-1}\\{2n-3}\end{pmatrix}$=$\begin{pmatrix} {2n-1}\\{2}\end{pmatrix}$.
However, the actual answer is $\begin{pmatrix} {2n+2}\\{2}\end{pmatrix}$$-3$$\begin{pmatrix} {n+1}\\{2}\end{pmatrix}$. Did i go wrong somewhere in my proof? Or is it some conceptual understanding gone wrong? Thanks!
This is same as the number of solutions to $$x+y+z = 2n$$ where $0 \leq x, y, z \leq n$. Thus we need the coefficient of $t^{2n}$ in \begin{align*} (1+t+t^2+ \cdots +t^n)^3 &= \left(\frac{1-t^{(n+1)}}{1-t}\right)^3\\ &=(1-3t^{(n+1)}+3t^{2(n+1)}-t^{3(n+1)})\left(1+\binom{3}{1}t + \binom{4}{2}t^2+ \cdots +\binom{3+k}{k+1}t^{k+1} + \cdots \right) \end{align*} Thus the required coefficient is $$\binom{2n+2}{2n} - 3 \binom{n+1}{n-1} = \binom{2n+2}{2} - 3 \binom{n+1}{2} $$