Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to find the coefficient of $ x^{36} $ in the expansion of $ (2 - x + x^2)^{21} $

So I found all possible combinations of $ \displaystyle 2^x, x^y, (x^2)^z $ that yield 36 and $ x + y + z = 21 $:

3, 0, 18

2, 2, 17

1, 4, 16

0, 6, 15

Adding those coefficients and plugging those numbers into Wolfram Alpha, I get:

(copy and paste link, because the wolfram link format is getting screwed up)!*2%5E3)%2F(3!*18!))%20%2B%20(%20(21!*2%5E2)%2F(2!*2!*17)%20)%20%2B%20(%20(21!*2)%2F(4!*16!)%20)%20%2B%20(%20(21!%2F(6!*15!)%20)&t=macw01

But this is not even close to the correct coefficient:

What am I screwing up? I went over those numbers ten times, and they're the only combinations I can think of.

share|cite|improve this question
up vote 2 down vote accepted

Don't worry, the only problem is a simple typo. For 2,2,17, the coefficient should be $$\frac{21!*2^2}{2!*2!*17!}.$$ Instead you imputed $$\frac{21!*2^2}{2!*2!*17}$$ into Wolfram Alpha. Notice there is a 17 in the denominator instead of $17!$. Once this is corrected, the answers do indeed match.

share|cite|improve this answer
Oh boy. Thank you this was driving me nuts! – iDontKnowBetter Sep 17 '11 at 20:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.