Can I please get some help finding a formula (in terms of $n$) for the sum of all binomial coefficients $\binom{n}{k}$ such that $k$ is divisible by 4? Ex) when $n=9, \binom{9}{0} + \binom{9}{4} + \binom{9}{8}=136$. My first intuition is to solve for the sum of $\binom{n}{4k}$ but I am worried that I will be over counting.
-
I think your intuition is correct, there is no reason to be worried! – Martin R Oct 04 '20 at 15:39
2 Answers
We want to compute $S = \sum_{k = 0}^{n} \binom{n}{k} f(k)$, where $f(k) = \begin{cases}1 & k \equiv 1 \pmod{4} \\ 0 & \text{otherwise} \end{cases}$. We can take $f(k) = \frac{1}{4}(1^k+i^k+i^{2k}+i^{3k})$ where $i = \sqrt{-1}$.
Then, we can rewrite our sum $S = \frac{1}{4}\left(\sum_{k=0}^n \binom{n}{k}1^k + \sum_{k=0}^n \binom{n}{k}i^k + \sum_{k=0}^n \binom{n}{k}i^{2k} + \sum_{k=0}^n \binom{n}{k}i^{3k}\right)$ which can be computed with binomial expansion.
Let $F_{n,0},F_{n,1},F_{n,2},F_{n,3}$ be the sums of binomial coefficients $\binom{n}{k}$ where $k$ is each of the congruences $\bmod 4$.
Using Pascal's recurrence one has:
$\begin{pmatrix}1 & 0 & 0 & 1 \\ 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1 \end{pmatrix} (F_{n,0},F_{n,1},F_{n,2},F_{n,3}) = (F_{n+1,0},F_{n+1,1},F_{n+1,2},F_{n+1,3})$
When $n=0$ we have the initial vector $(1,0,0,0)$ so we recover:
$(F_{n,0},F_{n,1},F_{n,2},F_{n,3}) = \begin{pmatrix}1 & 0 & 0 & 1 \\ 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1 \end{pmatrix}^n (1,0,0,0)$
This allows one to calculate these numbers using fast exponentiation. Alternatively one can diagonalize the circulant matrix to obtain a formula with complex numbers.
- 107,565