How would you calculate this sum using generating functions? I have tried a lot of things but cannot seem to get the right solution which should even contain $\sqrt{π}$
$$\sum_{k=0}^n (-1)^k \binom{n}{k}^2$$
binomial-coefficientsgenerating-functionssummation
How would you calculate this sum using generating functions? I have tried a lot of things but cannot seem to get the right solution which should even contain $\sqrt{π}$
$$\sum_{k=0}^n (-1)^k \binom{n}{k}^2$$
Best Answer
A slight variation of the theme. It is convenient to use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$. This way we can write for instance \begin{align*} [x^k](1+x)^n=\binom{n}{k}\tag{1} \end{align*}
Comment:
In (2) we use the binomial identity $\binom{p}{q}=\binom{p}{p-q}$.
In (3) we apply the coefficient of operator according to (1).
In (4) we apply the rule $[x^{p-q}]A(x)=[x^p]x^qA(x)$.
In (5) we apply the binomial theorem.
In (6) we select the coefficient of $[x^n]$ using Iverson brackets.