Finite Fourier Series

Theorem
Let $\map a n$ 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:
 * $\ds \map a n = \sum_{k \mathop = 0}^{b - 1} \map {a_*} k \xi^{n k}$

where:
 * $\ds \map {a_*} n = \frac 1 b \sum_{k \mathop = 0}^{b - 1} \map a k \xi^{-n k}$

Proof
Since $a$ has period $b$, we have:
 * $\map a {n + b} = \map a n$

So if we define:


 * $\ds \map F z = \sum_{n \mathop \ge 0} \map a n z^n$

we have:

where the last step defines the polynomial $P$.

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