[Math] Find closed form solution using generation function for the binomial coefficients

binomial-coefficientsgenerating-functions

I don't have any idea how to start this problem. Could you give a hint?

Find closed form solution using generation function for the binomial coefficients:

$$a_n:=\sum_{k=0}^{n}\binom{n}{k}^2(-1)^k$$

Best Answer

Note that: $a_n=\sum_{k \geq 0} \binom{n}{k}^2(-1)^k=\sum_{k \geq 0} \binom{n}{k} (-1)^k \times\binom{n}{n-k} $, since $\binom{n}{n-k}=\binom{n}{k}$, this is readily a convolution (of the coefficients of $(1-x)^n$ and the coefficients of $(1+x)^n$).

Looking closely, this is $$a_n=[x^n]\left\{(1-x)^n (1+x)^n\right\} = [x^n]\left\{(1-x^2)^n\right\}$$

Thus it follows that if $n$ is odd, then $a_n = 0$, because $(1-x^2)^n$ has only even powers of $x$. And, if $n$ is even, then $a_n = \binom{n}{n/2} (-1)^{n/2}$ by the Binomial Theorem.

Notation: $[x^n]\left\{p(x)\right\}$ denotes the coefficient of $x^n$ in $p(x)$.

Related Question