Do you know an easy way to prove the following $\forall~L$? $\sum\limits_{\scriptstyle k = 1,~k \ne L\atop \scriptstyle ~l = 1,~l \ne L}^N {\cos \left( {\frac{{2\pi }}{N}n(k - l)} \right)} - 2\sum\limits_{k = 1,~k \ne L}^N {\cos \left( {\frac{{2\pi }}{N}n(k - L)} \right)} + 1 = \left\{ \begin{array}{l} {(N - 2)^2}{\rm{~~if~}}n = 0\\ 4{\rm{~~~if~}}n \ne 0 \end{array} \right.$
All parameters are integer numbers.
for $n=0$ we have $$ (N-1)^2-2(N-1)+1 =(N-2)^2 $$
If $n\ne0$ , using the symmetry $ \cos(\pi - x) = -\cos(x)$ (or any other method) you should be able to convince yourself that $$ \sum\limits_{k = 1}^N {\cos \left( {\frac{{2\pi }}{N}n(k - L)} \right)} =0 $$ For all integers $N, L, n \ne 0$.
So $$\sum\limits_{k = 1,~k \ne L}^N {\cos \left( {\frac{{2\pi }}{N}n(k - L)} \right)} = 0 - {\cos \left( {\frac{{2\pi }}{N}n(L - L)} \right)} =-1 $$ And $$\sum\limits_{\scriptstyle k = 1,~k \ne L\atop \scriptstyle ~l = 1,~l \ne L}^N {\cos \left( {\frac{{2\pi }}{N}n(k - l)} \right)} \\ = \sum\limits_{\scriptstyle k = 1,~k \ne L}^N { - \cos \left( {\frac{{2\pi }}{N}n(k - L)} \right)} \\ = {\cos \left( {\frac{{2\pi }}{N}n(L - L)} \right)} =1$$