Put identical coins into identical boxes In how many ways can I put 200 (identical) coins into 3 identical boxes?
I started count it, and I saw that the possibilities goes this way:
$200, 0, 0$
$199, 1, 0$
$198, 2, 0$
$198, 1, 1$ 
$197, 3, 0$
$197, 2, 1$
ect.
which mean I can count it this way: $2 \cdot 1 + 2 \cdot 2 + 2 \cdot 3$ ect..
I'm wondering if there is a better way to count all the possibilities.
 A: First label the boxes A,B, and C. Now we can find the number of tuples (x,y,z) of configurations in which there are x in A, y in B and z in C. We do this by a method commonly known as Stars And Bars 
The number of tuples happens to be $\binom{202}{2}$
Now to treat the boxes as identical, we must filter out the dupicates. First we remove the cases where there x=y. Then we have something of the form 2x+z=200. Observe that the solutions are (x,z)=(0,200)(1,198)(2,196)(3,194)(4,192)...(100,0)
It should be clear that there are 101 such ways. To include the cases where y=z and x=z, we multiply by three, so we exclude 303 tuples (as they have been double counted), divide by three factorial, then add 101 back later (to compensate).
Observe that in each of the above three cases, we have no possibility of over-counting as we could only over-count if x=y=z, which is impossible as 3 does not divide 200.
So now the number of tuples where x,y and z are distinct is $\binom{202}{2} - 303$
Now we account for all permutations of x,y and z to find the number of ways denoted [x,y,z]. We do this by dividing by three factorial. Note that $\binom{202}{2}-303$ is divisible by six.
Thus we find that the number of ways of distributing 200 identical balls in 3 identical boxes is $\frac{\binom{202}{2}-303}{3!}+101 = 3434$
A: See OEIS sequence A001399. You are asking for the value of $a_{200}$ where $a_n$ is the number of partitions of the number $n$ into at most $3$ parts, or equivalently, the number of partitions of $n$ into parts of size at most $3$, that is, the number of ways we can write $n$ as a sum of $1$s, $2$s, and $3$s without regard to order.
Let $A_{n,i}$ be the set of all partitions of $n$ into parts of size at most $3$ with at least one part equal to $i$. By the in-and-out formula, for $n\gt0$ we have
$$a_n=|A_{n,1}\cup A_{n,2}\cup A_{n,3}|$$
$$=|A_{n,1}|+|A_{n,2}|+|A_{n,3}|-|A_{n,1}\cap A_{n,2}|-|A_{n,1}\cap A_{n,3}|-|A_{n,2}\cap A_{n,3}|+|A_{n,1}\cap A_{n,2}\cap A_{n,3}|$$
$$=a_{n-1}+a_{n-2}+a_{n-3}-a_{n-3}-a_{n-4}-a_{n-5}+a_{n-6}$$$$=a_{n-1}+a_{n-2}-a_{n-4}-a_{n-5}+a_{n-6}.$$
Now, the homogeneous linear recurrence
$$a_n=a_{n-1}+a_{n-2}-a_{n-4}-a_{n-5}+a_{n-6}$$
has the characteristic polynomial
$$t^6-t^5-t^4+t^2+t-1=(t-1)^3(t+1)(t^2+t+1)$$
with roots
$$1,\ 1,\ 1,\ -1,\ e^{2\pi i/3},\ e^{-2\pi i/3};$$
so the general solution is
$$a_n=An^2+Bn+C+D(-1)^n+E\cos\frac{2n\pi}3+F\sin\frac{2n\pi}3$$
where $A,B,C,D,E,F$ are arbitrary constants.
We use the initial values $a_0=1$ and $a_n=n$ for $n=1,2,3,4,5$ (or $a_n=0$ for $n=-1,-2,-3,-4,-5$) to evaluate the constants and get the particular solution
$$a_n=\frac{6n^2+36n+47+9(-1)^n+16\cos\frac{2n\pi}3}{72}.$$
Finally,
$$a_{200}=\frac{240000+7200+47+9-8}{72}=\boxed{3434}.$$
By the way, since
$$a_n=\frac{(n+2)(n+4)}{12}+\frac{-1+9(-1)^n+16\cos\frac{2n\pi}3}{72}$$
and since
$$\left|\frac{-1+9(-1)^n+16\cos\frac{2n\pi}3}{72}\right|\lt\frac12,$$
it follows that $a_n$ is the nearest integer to $\frac{(n+2)(n+4)}{12}$. For $n=200$ we have
$$\frac{(n+2)(n+4)}{12}=\frac{202\cdot204}{12}=3434=a_{200}.$$
A: Here we are looking for the number of integer partitions of $200$ consisting of one up to three parts.
The generating function for integer partitions with up to three parts is
\begin{align*}
\frac{1}{(1-z)(1-z^2)(1-z^3)}
\end{align*}
See Example I.6 in Analytic Combinatorics by P. Flajolet and R. Sedgewick for more information.

Denoting with $[z^n]$ the coefficient of $z^n$ in a series we obtain 
\begin{align*}
\color{blue}{[z^{200}]}&\color{blue}{\frac{1}{(1-z)(1-z^2)(1-z^3)}}\\
&=[z^{200}]\sum_{j=0}^\infty z^{3j}\sum_{k=0}^\infty z^{2k}\sum_{l=0}^\infty z^{l}\tag{1}\\
&=\sum_{j=0}^{66}[z^{200-3j}]\sum_{k=0}^\infty z^{2k}\sum_{l=0}^\infty z^l\tag{2}\\
&=\sum_{j=0}^{66}\sum_{k=0}^{\left\lfloor\frac{200-3j}{2}\right\rfloor} \left[z^{200-3j-2k}\right]\sum_{l=0}^\infty z^l\tag{3}\\
&=\sum_{j=0}^{66}\sum_{k=0}^{\left\lfloor\frac{200-3j}{2}\right\rfloor}1\tag{4}\\
&=\sum_{j=0}^{33}(101-3j)+\sum_{j=0}^{32}(99-3j)\tag{5}\\
&=\sum_{j=0}^{32}(200-6j)+101-3\cdot 33\tag{6}\\
&=33\cdot 200-6\cdot\frac{1}{2}\cdot32\cdot33+2\tag{7}\\
&=\color{blue}{3434}
\end{align*}

Comment:


*

*In (1) we use the geometric power series expansion   three  times.

*In (2) we apply the rule $[z^{p-q}]A(z)=[z^p]z^qA(z)$ to the left-most series. We set the upper index to $\lfloor\frac{200}{3}\rfloor=66$, since values  $>66$  do not  contribute.

*In (3) we continue with the next series in the same way as we did in (2).

*In (4) we select the coefficient of $z^{200-3j-2k}$ which is $1$.

*In (5) we split the sum into even and odd index $j$.

*In (6) we collect the sums  besides the  middle term  ($j=33$).

*In (7) we use the summation formula $\sum_{j=1}^n j=\frac{1}{2}n(n+1)$.
