In how many ways can n identical balls be distributed in three green, yellow and blue colored baskets?

Question: In how many ways can $n$ identical balls be distributed in three green, yellow and blue colored baskets?

My asnwer: For each ball exist $3$ possibilities of choosen, so $3*3*3*...*3$ $n$ times, that is $3^n$

Book's answer: Considering that the first basket has $0$ balls, the other two can have $(0, n), (1, n-1), ..., (n, 0)$ balls, that is, there are $(n+1)$ possibilities of distribute the remaining balls between the two baskets. Considering that the first basket has $1$ ball, there are $n$ possibilities to distribute the other balls in the other baskets, and so on. So there is a total of $T = (n+1) + n + ... + 1 = (n+1)(n+2)/2$

I understand the book's answer, but why is mine wrong?


Solution 1:

You answer is wrong because if you put ball 1 in blue and ball 2 in green, it is the same as if you put ball 1 in green and ball 2 in blue.

You've overcounted because the balls are identical.