About one generating function Initially, I have the following problem: find $$\sum_{k=0}^{n+1}(−1)^{n−k}4^k{n+k+1 \choose 2k}.$$ I thought, if I found the function $g_n(x) = \sum_{k=0}^{n}{n+k \choose 2k}x^k$, the answer would be $(-1)^ng_{n+1}(-4)$. I tried to factorize ${n + k \choose 2k}$ to ${n+k \choose k}{n \choose k}/{2k \choose k}$. It is known that $$(1-x)^{-n-1} = \sum_{k=0}^{\infty}{n + k \choose k}x^k,$$ $$(1-4x)^{-1/2} = \sum_{k=0}^{\infty}{2k \choose k}x^k,$$ $$(1+x)^n = \sum_{k=0}^n{n \choose k}x^k.$$ I have tried to combine these formulae, but nothing interesting has been found yet.

Suppose we seek to evaluate
$$\sum_{k=0}^{n+1} {n+1+k\choose 2k} (-1)^{n-k} 4^k
= (-1)^n \sum_{k=0}^{n+1} {n+1+k\choose n+1-k} (-4)^k.$$
Start from
$${n+1+k\choose n+1-k}
= \frac{1}{2\pi i} 
\int_{|z|=\epsilon} \frac{1}{z^{n+2-k}} (1+z)^{n+1+k} \; dz.$$
This yields the following expression for the sum
$$\frac{(-1)^n}{2\pi i} 
\int_{|z|=\epsilon}
\sum_{k=0}^{n+1} \frac{1}{z^{n+2-k}} (1+z)^{n+1+k} 
\times (-4)^k\; dz
\\ = \frac{(-1)^n}{2\pi i} 
\int_{|z|=\epsilon} \frac{(1+z)^{n+1}}{z^{n+2}}
\sum_{k=0}^{n+1} (1+z)^k \times z^k 
\times (-4)^k\; dz.$$
Observe that the defining integral of the binomial coefficient is zero
when $n+2  -k < 1.$  This condition  is precisely $n-k  < -1$ or  $k >
n+1.$ Therefore we may extend the sum to infinity.

We thus have
$$\frac{(-1)^n}{2\pi i} 
\int_{|z|=\epsilon} \frac{(1+z)^{n+1}}{z^{n+2}}
\sum_{k=0}^\infty  (1+z)^k \times z^k 
\times (-4)^k\; dz
\\ = \frac{(-1)^n}{2\pi i} 
\int_{|z|=\epsilon} \frac{(1+z)^{n+1}}{z^{n+2}}
\frac{1}{1+4(1+z)z} \; dz.
\\ = \frac{(-1)^n}{2\pi i} 
\int_{|z|=\epsilon} \frac{(1+z)^{n+1}}{z^{n+2}}
\frac{1}{(1+2z)^2} \; dz.$$
Therefore the value of the integral is given by
$$(-1)^n [z^{n+1}] \frac{(1+z)^{n+1}}{(1+2z)^2}
= (-1)^n \sum_{q=0}^{n+1} {n+1\choose n+1-q} (q+1) (-2)^q
\\= (-1)^n \sum_{q=0}^{n+1} {n+1\choose q} (q+1) (-2)^q.$$
Recall that $$(z (1+z)^n)'
= \sum_{q=0}^n {n \choose q} (q+1) z^q
= (1+z)^n + nz(1+z)^{n-1}$$
so that the end result for the sum is
$$(-1)^n \times ((-1)^{n+1} - 2(n+1)(-1)^n)
= -1 - 2(n+1) = -3 - 2n.$$
A trace as to when this method appeared on MSE and by whom starts at this
MSE link.
The reader is invited to try this method on the binomial coefficient
$${n+1+k\choose 2k}$$ and examine carefully what happens. 
