# Vanishing of a certain double sum of roots of unity

For $$d \in 2\mathbb{N}$$ and $$0 \leq k,l \leq d-1$$ the following double sum turned up in my computations: $$f(k,l)=\sum_{x=0}^{d-1} \sum_{y=0}^{d-1} \varepsilon(x+y)\exp\left( \frac{2 \pi i\cdot(k x + l y)}{d}\right).$$ Here, $$\varepsilon(z)=1$$ for $$0 \leq z \leq d-1$$ and $$\varepsilon(z) = -1$$ for $$d \leq z \leq 2d -2$$.

Using Mathematica, I noticed that $$f(k,l)\neq 0$$ iff $$k\cdot l=0$$ or $$k=l$$ (at least for the cases I looked at). This would simplify further computations significantly for me, so my question is:

If this is true in general, why so? I was trying some finite Fourier transform yoga, but I didn't succeed.

Progress so far: Maybe it is helpful to turn $$x+y$$ into a summation variable. For this we need to expand the double sum as follows (I hope I made no mistake) so that instead of one "square matrix" of double indeces we get three "triangles" of double indeces:

\begin{align} \sum_{x=0}^{d-1} \sum_{y=0}^{d-1}&=\sum_{x=0}^{2d-1} \sum_{y=0}^{2d-1-x} -\sum_{x=d}^{2d-1} \sum_{y=0}^{2d-1-x} -\sum_{y=d}^{2d-1} \sum_{x=0}^{2d-1-y}\\ &=\sum_{z=0}^{2d-1} \sum_{y=0}^{z} -\sum_{z'=0}^{d-1} \sum_{x'=0}^{z'} -\sum_{z'=0}^{d-1} \sum_{y'=0}^{z'}, \end{align} where $$z=x+y$$, $$z'=x+y-d$$, $$x'=x-d$$ and $$y'=y-d$$. So in the last two summands we have $$\varepsilon=1$$ and in the first summand we can split the first sum in positive part and a negative part. Using the geometric series then it should follow.

• Why the downvote? Commented Sep 14, 2022 at 15:21
• The same statement holds for all terms with $\epsilon=1$ and all terms with $\epsilon=-1$ separately, so it might be easier to look at one at a time. Commented Sep 14, 2022 at 16:11