Ramus's Identity

Theorem
Let $k, m, n \in \Z_{\ge 0}$ be positive integers such that $0 \le k < m$.

Then:

Proof
Let $\omega := e^{2 \pi i / m}$.

Then by the Binomial Theorem:
 * $(1): \quad \displaystyle \sum_{0 \mathop \le j \mathop < m} \paren {1 + \omega^j}^n \omega^{-j k} = \sum_t \sum_{0 \mathop \le j \mathop < m} \binom n t \omega^{j \paren {t - k} }$

By Sum of Geometric Sequence:


 * $\displaystyle \sum_{0 \mathop \ge j \mathop < m} \omega^{j \paren {t - k} } = \begin{cases} \dfrac {1 - \omega^{m \paren {t - k} } } {1 - \omega^{t - k} } & : t - k \not \equiv 0 \pmod m \\ m & : t \equiv k \pmod m \end{cases}$

We have that:


 * $\omega = \exp \dfrac {2 \pi i} m \implies \omega^m = 1$

and so:

Thus the summation on the of $(1)$ is:


 * $m \displaystyle \sum_{t \bmod m \mathop = k} \binom n t$

The summation on the of $(1)$ is:

Because the is wholly real, so must the  be.

So, taking the real parts of the and equating it to the  reveals the result.