Find all non-negative integer solutions of $x+y+z=20$ I'm looking for all non-negative integer solutions to $x+y+z=20$ and I reason this way:  I essentially take $\overbrace{1 + 1 + ... + 1}^{\text{20}}$ and segment this into three groupings.  In essence that's the same as picking two divisions somewhere in the list of 1s.  For 20 numbers there are 20 places at which to insert a dividing line, including before the first 1 and after the last.  
My main thought at this point is that I want to find the number of ways of picking two things from a pool of 20, using $_{20}C_2$, but that selects without replacement.  However, in this case it seems that I should be able to select any dividing location more than once (representing one of the variables being equal to 0).
Is the answer then $_{20}C_2$ for non-zero solutions, then for solutions including zero we could assume $x$ is zero and then there are 20 solutions to $y+z=20$, and 20 for $x+z=20$ and 20 for $x+y=20$ so sum these all together?
[Edit: ... and subtract off the number of solutions that have both $x=0=y$ and so on, so that would be subtracting off 3 solutions.]
 A: I prefer not to insert dividing lines at the ends. 
Here is a solution appropriate for October 31. Three kids come to your door, and you want to distribute $20$ identical candies between them, with perhaps some kid(s) getting nothing.
Line up $23$ candies. There are $\binom{22}{2}$ ways to insert $2$ dividing lines between the candies. Give each kid the number of candies determined by the dividing lines. Then (the difficult part) take away a candy from each kid. Each way of dividing $20$ candies between the kids, with possibly some kid(s) getting none, arises in a unique way from the process of distributing $23$ candies between them, at least one to each, and then taking away a candy from each.
So there are $\binom{22}{2}$ ways to do the job.  
A: The general solution for such sums is $\binom{n+k-1}{k-1}$. Here $n=20$ and $k=3$ so the number of solutions is $\binom{20+3-1}{3-1}=\binom{22}{2}=231$. I hope this helps you.
A: In lines of partition of numbers:
Number of partitions of $20$ of size $3,2,1$ are $33,10,1$ respectively.
Now, if ordering doesn't matter ($x\le y\le z$), number of non-negative integer solutions $= 33+10+1=44$
If ordering is important, number of non-negative integer solutions $=3!\times 33+{3\choose2}\times 10 + 3=231$
Each $3$-Partition of 20 can be arranged in $3!$ different ways, each $2$-Partitions in ${3\choose2} =3$ different ways, and $1$-Partitions in 3 different ways ($x=20,y=20$ or $z=20$)
(I used wolfram alpha to find number of partitions of size n, shared it here since it is a different approach to the problem.)
