Finite Fourier Series

Theorem
Let $a \left({n}\right)$ be any finite periodic function on $\Z$ with period $b$.

Let $\xi = e^{2 \pi i/ b}$ be the first $b$th root of unity.

Then:


 * $\displaystyle a \left({n}\right) = \sum_{k \mathop = 0}^{b - 1} a_* \left({k}\right) \xi^{n k}$

where:


 * $\displaystyle a_* \left({n}\right) = \frac 1 b \sum_{k \mathop = 0}^{b - 1} a \left({k}\right) \xi^{-n k}$

Proof
Since $a$ has period $b$, we have:
 * $a \left({n + b}\right) = a \left({n}\right)$

So if we define:


 * $\displaystyle F \left({z}\right) = \sum_{n \mathop \ge 0} a \left({n}\right) z^n$

we have:

where the last step defines the polynomial $P$.

If we expand $F$ now using partial fractions, we get