If we have a finite sum defined as
$$\frac{1}{N}\sum\limits_{n=N/4}^{3N/4-1} e^{-4\pi ink/N}$$
(where $k$ is an integer and $N$ is divisible by $4$), then how can we show that this sum is equal to $0$ for any positive integer $k$?
Here's what I tried to do ($W_N$ is an $Nth$ root of unity):
$$\sum\limits_{n=N/4}^{3N/4-1} e^{-4\pi ink/N} = W_N^{-kN/2}+W_N^{-kN/2}W^{-2k}+...+W_N^{-3kN/2}W_N^{2k}=e^{\pi i k}+e^{\pi i k}e^{-4\pi ik/N}+...+e^{-3\pi ik}e^{4\pi ik/N}$$
But how does it sum up to zero? I'm totally lost.
Since $N$ is a multiple of $4$, let $N = 4m$.
Then, ignoring the $\frac1{N}$,
$\begin{array}\\ \sum\limits_{n=N/4}^{3N/4-1} e^{-4\pi ink/N} &=\sum\limits_{n=m}^{3m-1} e^{-\pi ink/m}\\ &=\sum\limits_{n=m}^{3m-1} \left(e^{-\pi ik/m}\right)^n\\ &=\sum\limits_{n=m}^{3m-1} r^n \qquad\text{where } r = e^{-\pi ik/m}\\ &=r^m\sum\limits_{n=m}^{3m-1} r^{n-m}\\ &=r^m\sum\limits_{n=0}^{2m-1} r^{n}\\ &=r^m\dfrac{r^{2m}-1}{r-1}\\ &=e^{\pi i k}\dfrac{e^{2\pi i k}-1}{r-1} \qquad\text{since } r = e^{-\pi ik/m}\\ &= 0 \qquad\text{unless }r=1\\ \end{array} $
If $r=1$, then the sum is $2m$. This only happens if $k/m$ is an even integer, or $4k/N$ is even, which is the case pointed out by Soke.