# How to prove that below quantity is purely imaginary?

How do I prove that the following quantity is purely imaginary:

$$\sum_{0\leq l_1<l_2<l_3<l_4\leq q-1} e^{-2\pi i \frac{(l_1^2-l_2^2+l_3^2-l_4^2)}{q} }$$ where $q$ is an odd number?

• Here $q$ "is" an odd number. No assumtions. The above quantity is imaginary for $q$ odd, which can be verified using a machine but I want to prove it analytically. – SanK17 Sep 14 '17 at 10:42
• Maybe try to show it is invariant under sending $a+bi$ to $-a+bi$. – M. Van Sep 14 '17 at 10:42
• or better: try to show that complex conjugation results in multiplying by $-1$! – M. Van Sep 14 '17 at 10:44
• @M.Van Yeah, I have tried to sum up the quantity and its conjugate and simplify the expression. But, couldn't succeed. – SanK17 Sep 14 '17 at 10:51
• What is the source of this problem? – lhf Sep 14 '17 at 12:11