September 25, 2007

Let
P(x)=(1+x)^{1000}+x(1+x)^{999}+x^2(1+x)^{998}+\cdots +x^{1000}.


Solution.  (a) 
For a polynomial $p(x)$, let $[x^m]p(x)$ denote the coefficient of $x^m$ in $p(x)$. By the Binomial Theorem,
(x+1)^n = \sum_{k=0}^n {n \choose k} x^k.
From this, we see that
[x^m](x+1)^n={n\choose m}.
Therefore,
$\begin{eqnarray} [x^m](x^{1000-k}(x+1)^k) &=& [x^{m-(1000-k)}](x+1)^k\\ &=&{k\choose {m-(1000-k)}} = {k\choose {1000-m}}. \end{eqnarray}$
The polynomial in the problem equals
\sum_{k=0}^{1000} x^{1000-k}(x+1)^k.
so
$\begin{eqnarray} [x^m]\sum_{k=0}^{1000} x^{1000-k}(x+1)^k &=& \sum_{k=0}^{1000} [x^m] x^{1000-k}(x+1)^k \\ &=&\sum_{k=0}^{1000} {k\choose {1000-m}} \\ &=& {1001\choose {1001-m}} = {1001\choose m}.\end{eqnarray}$
Therefore the coefficient of $x^{50}$ is ${1001\choose 50}$.

(b) From the previous part, we see that the sum of all the coefficients is
\sum_{m=0}^{1000} [x^m] = \sum_{m=0}^{1000} {1001\choose m} = 2^{1001}-1.