Determining Fourier Series coefficient for Discrete time I am trying to solve the proof for determining the Fourier series representation of a periodic signal. 
I understand fourier series equation for Discrete time which is $$x[n] = \sum^{}_{k=&lt;N&gt;} a_k  e^{jk\omega_0n}$$
In order to find the Fourier series coefficient we multiply both side by $e^{-jr(2\pi/N)n}$ and summation over N terms, That is:
$$\sum^{}_{n=&lt;N&gt;} x[n] e^{-jr(2\pi/N)n} = \sum^{}_{n=&lt;N&gt;} \sum^{}_{k=&lt;N&gt;} a_k  e^{j(k-r)(2\pi/N)n}$$

After that i couldn't understand how can we get the final term:
$$ a_r = \frac{1}{N} \sum^{}_{n=&lt;N&gt;} x[n]e^{jr(2\pi/N)n}$$

Please, anyone, help me to understand this
In the formula displayed for $x[n]$, the exponentials $e^{jk\omega_0 n}$ should be $e^{-jk\omega_0 n}$. I'm assuming that the sum $\sum\limits_{n = \langle N\rangle}$ is extended over all integers $n$ from $0$ to $N-1$. Fix $r\in \{0,\ldots, N-1\}$. Then 

$$\sum_{n = \langle N\rangle}x[n]e^{jr\omega_0 n} = \sum_{n = \langle N\rangle}\sum_{k = \langle N\rangle}a_ke^{-jk\omega_0 n}e^{jr\omega_0 n} = \sum_{k = \langle N\rangle} a_k \sum_{n = \langle N\rangle} e^{j(r-k)\omega_0 n}.\tag{*}$$

If $k = r$, then each of the terms $e^{j(r-k)\omega_0 n}$ equals $1$, in which case 

$$\sum_{n = \langle N\rangle} e^{j(r-k)\omega_0 n} = N.$$

If $k \neq r$, let $z = e^{j(r-k)\omega_0}$. Then $z\neq 1$ and $z^N = e^{2\pi j(r-k)n} = 1$. Thus

$$\sum_{n = \langle N\rangle} e^{j(r-k)\omega_0 n} = \sum_{n = \langle N\rangle} z^n = \frac{1 - z^N}{1 - z} = 0.$$

In summary, 

$$\sum_{n = \langle N\rangle} e^{j(r-k)\omega_0 n} = N\delta_{k,r}.$$

Therefore,

$$\sum_{k = \langle N\rangle} a_k \sum_{n = \langle N\rangle} e^{j(r-k)\omega_0 n} = \sum_{k = \langle N \rangle} a_k (N\delta_{k,r}) = N\sum_{k = \langle N\rangle} a_k \delta_{k,r} = Na_r.\tag{**}$$

Combining (*) and (**), 

$$Na_r = \sum_{n = \langle N\rangle} x[n]e^{jr\omega_0 n} = \sum_{n = \langle N\rangle}x[n]e^{jr(2\pi/N)n}.$$

Hence

$$a_r = \frac{1}{N}\sum_{n = \langle N\rangle} x[n]e^{jr(2\pi/N)n}.$$