DT Signal Fourier Coefficients
Let's make up a signal.
$ x[0] = 0 $
$ x[1] = 1 $
$ x[2] = 1 $
$ x[3] = 0 $
$ x[4] = x[0] $ etc, the function is periodic with period 4
Using the formula
$ x[n] = \sum_{k=0}^{N-1} a_k e^{jk \frac{2 \pi}{N} n} $, where $ a_k = \frac{1}{N} \sum_{r=0}^{N-1} x[r] e^{-jk \frac{2 \pi}{N} r} $
Since the period is 4, N=4.
$ x[n] = \sum_{k=0}^{3} a_k e^{jk \frac{2 \pi}{4} n} $, where $ a_k = \frac{1}{4} \sum_{r=0}^{3} x[r] e^{-jk \frac{2 \pi}{4} r} $
Now to find the fourier series coefficients:
$ a_0 = \frac{1}{4} \sum_{r=0}^{3} x[r] e^{-j(0) \frac{\pi}{2} r} = \frac{1}{4} \sum_{r=0}^{3} x[r] e^{0} = \frac{1}{4} (x[0] + x[1] + x[2] + x[3]) = \frac{1}{4} (0 + 1 + 1 + 0) = \frac{1}{2} $
$ a_1 = \frac{1}{4} \sum_{r=0}^{3} x[r] e^{-j(1) \frac{\pi}{2} r} = \frac{1}{4} \sum_{r=0}^{3} x[r] e^{-j \frac{\pi}{2} r} = \frac{1}{4} (x[0] e^{0} + x[1] e^{-j \frac{\pi}{2}} + x[2] e^{-j \pi}+ x[3] e^{-j \frac{3 \pi}{2} }) $
$ = \frac{1}{4} (0(0) + 1(-j) + 1*-1 + 0*i) = \frac{1-j}{4} $