Finite Fourier Series

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

Let $$\xi = e^{2\pi i/b} \ $$ is the first $b$th root of unity, then:


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

where


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

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

So if we define:
 * $$F \left({z}\right) = \sum_{n \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