Is there any identity concerning the following sum?
$$\sum^n_{k=0}{n \choose k}^2x^k$$
I tried to apply proofs similar to a proof of Vandermonde's identity, but I couldn't get a clear answer.
One thing I saw is
$$\sum^n_{k=0}{n \choose k}^2x^k=\oint_{|z|=1}\frac{(1+z)^n}{z^{n+1}}(1+xz)^n\frac{dz}{2\pi i}$$ but I can't interpret or evaluate the right hand side...
The following identity holds:
$$P_n(t) = \frac{1}{2^n}\sum_{k=0}^n \binom{n}{k}^2 (t+1)^{n-k}(t-1)^k $$
where $P_n$ is the Legendre polynomial of order $n$. Making the substitution $t = -\frac{x+1}{x-1}$, we get $$\begin{split} P_n\left(\frac{x+1}{1-x}\right) &= \frac{1}{2^n}\sum_{k=0}^n \binom{n}{k}^2 \left(\frac{x+1}{1-x}+1\right)^{n-k}\left(\frac{x+1}{1-x}-1\right)^k \\ &= \frac{1}{2^n}\sum_{k=0}^n \binom{n}{k}^2 \left(\frac{2}{1-x}\right)^{n-k}\left(\frac{2x}{1-x}\right)^k \\ &= \sum_{k=0}^n \binom{n}{k}^2 x^k (1-x)^{k-n-k} = \frac{1}{(1-x)^n}\sum_{k=0}^n \binom{n}{k}^2 x^k\end{split}$$
So we obtain the identity
$$\sum_{k=0}^n \binom{n}{k}^2 x^k = (1-x)^n P_n\left(\frac{x+1}{1-x}\right) $$