# Calculate the $26$ term for the generating function.

Let $\lambda x.(1+x+x^{10})^{20}$. What is the the $26$ term for the series generated by this function?

Thanks.

• What's going on with "$\lambda x$."? Is the polynomial $(1+x+x^{10})^{20}$? Or is there a linear factor out front? – alex.jordan Mar 20 '14 at 3:20

Writing out the polynomial is a huge pain, so I advise against that. Even calculating it with Maple might take a long time. But we can be more direct.

The coefficient of the $26$th term, ie what you're after, counts the number of ways $x^{26}$ appears in the polynomial expansion of your crazy polynomial. This is the same problem as counting the number of ordered sequences of length 20 consisting of entries 0,1,10 where the entries sum to 26.

With that, we quickly see we need to have one or two 10s to prevent over or under shooting 26, and there are 20 choose 1 places to position a single 10, and 20 choose 2 places to position two 10s. Then we need to grab and position sixteen and six 1s respectively for the sequence. All the remaining positions will be 0.

With one 10, we have sixteen 1s and three 0s. After placing the 10 in one of 20 ways, there are 19 positions left to fill, and 19 choose 3 ways to fill them with sixteen 1s and three 0s. Similarly, the two 10 case has 18 choose 6 ways to fill the other eighteen spots besides the two 10s.

In all, the number of such sequences is $$\binom{20}{1}\cdot\binom{19}{16} + \binom{20}{2}\cdot\binom{18}{6} ,$$ which is also the answer to your question.

• +1 although I think $\binom{19}{16}$ would be more instructive in the formula than $\binom{19}{3}$. – alex.jordan Mar 20 '14 at 3:20

What is $\lambda x$?

In any event, I''ll assume you are asking for the coefficient of $x^{26}$ in $(1+x+x^{10})^{20}$.

Let $[x^k] P(x)$ stand for the operation extracting the coefficient of $x^k$ from a polynomial of $P(x)$. Expanding the polynomial and only keep tracks of terms that contribute to final answer, we have:

\begin{align} &[x^{26}]\left( (1+x+x^{10})^{20}\right)\\ = & [x^{26}]\left( (1+x)^{20} + \binom{20}{1}(1+x)^{19} x^{10} + \binom{20}{2}(1+x)^{18}x^{20} + \cdots \right)\\ = & \binom{20}{1} [x^{16}]\left( (1+x)^{19} \right) + \binom{20}{2}[x^6]\left((1+x)^{18}\right)\\ = & \binom{20}{1} \binom{19}{16} + \binom{20}{2}\binom{18}{6} \end{align}

• Very nice and clear. I'll <strike>steal</strike>borrow this. – vonbrand Mar 20 '14 at 18:57