0

Below is the solution with the hint
Find a compact form of the sum: $\sum_{k=0}^{n}{n \choose k}^2(-1)^k$ Hint: $ (1-x^2)^n = (1-x)^n \cdot (1+x)^n $

$ \sum_{k=0}^{n}{n \choose k}(-1)^k x^{2k} $ $ = \sum_{k=0}^{n}{n \choose k}(-1)^k x^k $ $ = ( {n \choose 0}x^0 - {n \choose 1}x^1 + {n \choose 2}x^2 ... + (-1)^n {n \choose n}x^n $

$ (-x^2 + 1)^n = \sum_{k=0}^{n}{n \choose k}(-x^2)^k 1^{n-k} $ $ = \sum_{k=0}^{n}(-1)^k x^{2k}$

$ {n \choose 0}{n \choose n} - {n \choose 1} {n \choose n-1} + {n \choose 2}{n \choose n-2} - ... + (-1)^n \cdot {n \choose n}{n \choose 0} = \sum_{k=0}^{n}{n \choose k}{n \choose n-k}(-1)^k = \sum_{k=0}^{n}{n\choose k}^2 (-1)^k$

$ 2\not{|} n \Rightarrow 0$
$ 2 | n \Rightarrow {n \choose \frac{n}{2}}$

So i really don't understant why we can use $x^{2k}$ instead of $ {n \choose k} $ in the first equation.
I also don't understand where the result with $n|2$ came from ( With $n \not{|}2$ result is obvious even without solving).

I also found a very similar equation (maybe a bit more difficult) which I can't figure out either similar equation

I hope someone can help me understand this solution :)

1 Answers1

2

There're a lot of typos/errors in the solution you've written up. Here is another solution that fixes those and tries to cut out the meandering as well:

$$\begin{align*} \sum_{k=0}^n \binom{n}{k}(-1)^kx^{2k} &= \sum_{k=0}^n \binom{n}{k}(-x^2)^k \\ &= (1-x^2)^n \\ &= (1-x)^n \cdot (1+x)^n \\ &= \left(\sum_{i=0}^n \binom{n}{i}(-x)^i\right)\left(\sum_{j=0}^n\binom{n}{j}x^{n-j}\right) \\ &= \sum_{i=0}^n\sum_{j=0}^n \binom{n}{i}\binom{n}{j}(-1)^ix^{n+i-j} \end{align*}$$

Now we look at the coefficient of $x^n$ in the first and last sums:

  • In the last expression, $x^{n+i-j}=x^n$ when $n+i-j=n$, so $j=i$. That is, the coefficient of $x^n$ is $$\sum_{i=0}^n \binom{n}{i}\binom{n}{i}(-1)^i = \sum_{i=0}^n \binom{n}{i}^2(-1)^i$$
  • In the first expression, $x^{2k} = x^n$ when $2k=n$, so $n/2 = k$ is an integer. That is, when $n/2$ is an integer, the coefficient of $x^n$ is $$\binom{n}{n/2}(-1)^{n/2}.$$ Otherwise, the coefficient of $x^n$ is $0$.

Since the coefficients of power series for a generating function (or polynomials in this case) are unique, these two expressions for the coefficients of $x^n$ must agree, giving $$\sum_{i=0}^n \binom{n}{i}^2 (-1)^i = \begin{cases}\binom{n}{n/2}(-1)^{n/2} & \text{ if } n \text{ is even} \\ 0 & \text{ if } n \text{ is odd}\end{cases}$$