An analog of the equation is x+y+z=n red marbles and 2 white marbles. There are C(n+2,2) ways of arranging all n+2 marbles in a row. The number of red marbles to the left of the first white one constitute x; those between the two white marbles are the number y; and those to the right of the second white marble number z.
If there are no red marbles in any particular on of these positions, that counts as the number zero, which is ok, as we are seeking nonnegative numbers, and that includes zero.
So there are C(n+2,2) nonnegative integral solutions to the equation

Posted by Charlie
on 20150330 09:12:24 