Periodic DT Signal
$ x[n] = \sum_{k=0}^{N-1}a_k e^{jk\frac{2\pi}{N} n} $
Where $ a_k = \frac{1}{N} \sum_{n=0}^{N-1}x[n] e^{-jk\frac{2\pi}{N} n} $
$ \omega = \frac{2\pi *k}{N} $
if
$ x[n] = 2cos(5\pi n) $
then
$ N = \frac{2\pi}{5\pi}*k = \frac{2}{5}*5 = 2 $
So
$ a_k = \frac{1}{2} \sum_{n=0}^{N-1}x[n] e^{-jk\frac{2\pi}{2} n} $
$ a_0 = \frac{1}{2} \sum_{n=0}^{1}x[n] e^{0} $
$ a_0 = \frac{1}{2} *-2 $
$ a_0 = -1 $
$ a_1 = \frac{1}{2} \sum_{n=0}^{1}x[n] e^{-j\pi n} $
$ a_1 = \frac{1}{2} (-2*e^{0} + 2*e^{-j\pi}) $
$ a_1 = \frac{1}{2} (-2 + -2) = -2 $