# Any hints to evaluate $\sum_{i=0}^{n}\frac{1+(-1)^i}{2}\binom{n}{i}$? [duplicate]

I am looking for any kind of help you can provide to evaluate the sum $\sum_{i=0}^{n}\frac{1+(-1)^i}{2}\binom{n}{i}$, which equals $\binom{n}{0} + \binom{n}{2} + \binom{n}{4} + \cdots + \binom{n}{k}$ where $k=n$ if $n$ is even or $k=n-1$ otherwise.

## marked as duplicate by Math Lover, Lord Shark the Unknown, Nosrati, user99914, Community♦Dec 15 '17 at 5:33

As $x^2=1,x=?$

Set $b=\pm c$ in

$$(a+b)^n$$ and add

Can you recognize $a,c$ here?

Let's first note that: $2^n = (1+1)^n = \sum_{i=0}^n \binom{n}{i}1^{n-i}1^i = \sum_{i=0}^n \binom{n}{i}$ and that $0 = (1 + (-1))^n = \sum_{i=0}^n\binom{n}{i} 1^{n-i}(-1)^i = \sum_{i=0}^n \binom{n}{i}(-1)^i$. We have then:\begin{align*} \sum_{i=0}^{n}\frac{1+(-1)^i}{2}\binom{n}{i} &= \frac{1}{2}\sum_{i=0}^{n}\binom{n}{i}(1+(-1)^i) \\ &= \frac{1}{2}\left( \sum_{i=0}^{n}\binom{n}{i} + \sum_{i=0}^{n}\binom{n}{i}(-1)^i \right) \\ &= \frac{1}{2}\left( 2^n + 0 \right) \\ &= 2^{n-1} \text{.} \end{align*}

• What was the reason of asking a duplicated question and then answer it by using a link after half an hour? – Farrokh Dec 15 '17 at 5:48
• What is the reason of asking a duplicated question? I clearly did not know it was duplicated. My question and its duplicate are stated in two different ways. Why answering it? Because people might come across my form of the question instead of the other form. The link I shared was indeed in a comment in the duplicated question, a much more useful comment than your rethoric question that does not provide any help nor guidance at all. – Esteban Mendoza Dec 15 '17 at 6:44