TITLE: Evaluate $ \binom{n}{0}+\binom{n}{2}+\binom{n}{4}+\cdots+\binom{n}{2k}+\cdots$
QUESTION [13 upvotes]: I need to evaluate, for a certain worded question: 
If n is even
$$\binom{n}{0}+\binom{n}{2}+\binom{n}{4}+\cdots\binom{n}{n}$$ 
If n is odd
$$\binom{n}{0}+\binom{n}{2}+\binom{n}{4}+\cdots\binom{n}{n-1}$$ 
I havent been able to reduce this using the binomial expansion.

REPLY [3 votes]: Here's a more general take.  Sums of the form $\sum_k \binom{n}{2k} f(k)$ are sometimes called aerated binomial sums.  My paper "Combinatorial Sums and Finite Differences" (Discrete Mathematics, 307 (24): 3130-3146, 2007) proves some general results about these aerated binomial sums.  (See Section 4.)  The case $f(k) = 1$ (as in the OP's question) falls out nicely.
Suppose you are interested, for some function $f(k)$, in the binomial sum 
$$B(n) = \sum_{k=0}^n \binom{n}{2k} f(k).$$
Then, taking the finite difference $\Delta f(k) = f(k+1) - f(k)$, denote $A(n)$ by 
$$A(n) = \sum_{k=0}^n \binom{n}{2k} \Delta f(k).$$
In the paper I prove that $B(n)$ and $A(n)$ are related via 
$$B(n) = 2^{n-1} f(0) + 2^n \sum_{k=2}^n \frac{A(k-2)}{2^k} + \frac{f(0)}{2}[n=0],$$
where $[n=0]$ evaluates to $1$ if $n=0$ and $0$ otherwise.
Since $f(k) = 1$ in the OP's question, $\Delta f(k) = 0$, and so $A(n) = 0$ for all $n$.  Thus $$\sum_{k=0}^n \binom{n}{2k} = 2^{n-1} + \frac{1}{2}[n=0].$$

More generally, this approach can be used to prove that, for $m \geq 1$,
$$\sum_k  \binom{n}{2k} k^{\underline{m}} = n(n-m-1)^{\underline{m-1}} \, 2^{n-2m-1}  [n \geq m+1],$$
and
$$\sum_k  \binom{n}{2k} k^m = n \sum_j \left\{ m \atop j\right\} \binom{n-j-1}{j-1} (j-1)! \, 2^{n-2j-1},$$
where $\left\{ m \atop j\right\}$ is a Stirling number of the second kind.  (While the second equation swaps one sum for another, there are no more than $m$ terms in the right-hand side, and so it is useful when $m$ is small.)

The approach can also be extended to sums of the form $\sum_k \binom{n}{ak+b} f(k)$.  (And the case $a = 2, b = 1$ is considered explicitly in the paper.)  Using higher values of $a$ and $b$ would result in increasingly complicated expressions, though.