Multinomial Theorem

Homework Statement

Find the coefficient of the $$x^{12}y^{24}$$ for $$(x^3+2xy^2+y+3)^{18}$$.

Homework Equations

Multinomial theorem, as stated on http://en.wikipedia.org/wiki/Multinomial_theorem

The Attempt at a Solution

Using the multinomial theorem in the form of the wikipedia post, I would set $$x_1=x^3, x_2=2xy^2, x_3=y, x_4=3$$. Now I need to find the k's that "match" the coefficients of the term from the problem statement. This will give me a relation between the k's of the following form
$$3k_1+k_2 = 12, 2k_2+k_3 = 24, and k_1+k_2+k_3+k_4=18$$. Now I let $$k_1$$ vary and record the discrete values $$k_2, k_3, k_4$$, but what I'm confused on is why do I sometimes get negative values for $$k_4$$? Do I need to do something different with the relationship of the k's. Thanks in advance.

Answers and Replies

You wrote down three restrictions, but there is a fourth as well, namely that all the k_i's must be nonnegative. Looks like k_1 can be 0 or 1, and that's all.

cool, so everything else looks good?