Finite Fourier Series

Theorem
Let $$a(n) \ $$ be any finite periodic function on $$\mathbb{Z}$$ with period b. If $$\xi=e^{2\pi i/b} \ $$ is the first bth root of unity, then

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

where

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

Proof
Since a has period b, we have $$a(n+b)=a(n)$$ and so if we define $$F(z)=\sum_{n\geq0}a(n)z^n$$, we have

$$F(z) = \left({ \sum_{k=0}^{b-1} a(k)z^k }\right) + z^b \left({ \sum_{k=0}^{b-1}a(k)z^k }\right) + z^{2b}  \left({ \sum_{k=0}^{b-1}a(k)z^k }\right)+...$$

$$= \frac{1}{1-z^b}\left({ \sum_{k=0}^{b-1} a(k)z^k }\right) = \frac{P(z)}{1-z^b}$$

where the last step defines the polynomial P. If we expand F now using partial fractions, we get