# $\binom{n}{0} +\binom{n}{4}+\binom{n}{8}+ \cdots$ [duplicate]

Compute the sum $$\binom{n}{0} + \binom{n}{4} + \binom{n}{8} + \cdots$$

I use the $$(1+i)^n$$ and $$(1+1)^n$$ and I obtained: $$(1+i)^n + (1+1)^n=\binom{n}{0}+\binom{n}{1}i+\binom{n}{2}(-1)+\binom{n}{3}(-i)+\binom{n}{4}+\cdots$$$$+\binom{n}{0}+\binom{n}{1}+\binom{n}{2}+\binom{n}{3}+\binom{n}{4}+ \cdots$$ After reductions: $$(1+i)^n + (1+1)^n=2\left(\binom{n}{0}+\binom{n}{4}+\binom{n}{8}+\cdots\right)+2\left(\binom{n}{1}+\binom{n}{3}+\binom{n}{5}+\cdots+ \binom{n}{\frac{n}{2}-1}\right)$$ $$(1+i)^n + (1+1)^n=2\left(\binom{n}{0}+\binom{n}{4}+\binom{n}{8}+\cdots\right)+2^{\frac{n}{2}-1}$$

Then: $$\binom{n}{0}+\binom{n}{4}+\binom{n}{8}+\cdots=\frac{(1+i)^n + (1+1)^n-2^{\frac{n}{2}-1}}{2}$$

I'm not very sure that the result is correct, it seems to me that something is missing or I approached wrong this sum.

• "After reductions" where did the $i$'s go on the right-hand side? The coefficient of $\binom{n}{1}$ for example is $i+1$ and not $2$.
– Gary
Commented Mar 31, 2022 at 9:34
• I used the formula $$\binom{n}{k}=\binom{n}{n-k}$$ Commented Mar 31, 2022 at 9:42
• Don't forget $(1-1)^n=\delta_{n0}$ for integers $n\ge0$.
– J.G.
Commented Mar 31, 2022 at 9:55