Fourier series formula with finite sums 
Let $f\in C(\mathbb{R}/2\pi\mathbb{Z})$, meaning that $f$ is continuous with period $2\pi$. Let $x_N(j)=2\pi j/N$. Define $$c_N(n)=\dfrac1N\sum_{j=1}^Nf(x_N(j))e^{-ix_N(j)n}.$$ Show that for any integer $M$, $$f(x_N(j))=\sum_{n=-M}^{N-M-1}c_N(n)e^{ix_N(j)n}.$$

This looks like the Fourier series formula, but the Fourier series comes with the integral from $-\pi$ to $\pi$. Here there are only finite sums. How do we prove it?

You are asked to prove the formula for the Discrete Fourier Transform. The continuous periodic function is largely irrelevant, since we only deal with its values on the uniform grid $x_j$. Presumably there is some way to get DFT from continuous Fourier transform, but I would not bother: the DFT is simpler, since we work in a finite dimensional space:  the space  of  $N$-periodic functions on the grid $\frac{2\pi}{N}\mathbb Z$. This space if $N$-dimensional, with natural inner product $\langle f,g\rangle =\sum_{j=0}^{N-1} f(j)\overline{g(j)}$. The vectors $f_k$, $k=0,\dots,N-1$, defined by $f_k(j) = \exp(ijk/N)$, are   orthogonal. Each has norm $\sqrt{N}$. Hence, every function $f$ is expanded as $\sum_{k=0}^{N-1} c_k f_k$ where $c_k=\frac{1}{N}\langle f,f_k\rangle$. This was the formula to be proved. Lastly, the interval $j=0,\dots,N-1$ could be replaced by any interval of the same length, due to periodicity.
