# A Gauss sum over a field.

Let $K$ be a field (not necessarily $\mathbb C$) and let $\zeta=\zeta_n$ be a primitive $n$th root of unity in $\bar K$.

I would like to know if there is a formula calculating $$\sum_{k=1}^n \zeta^{-k^2}.$$

If it exists please tell me the formula.

Thank you in advance.

-
Experiments suggest that if $n\equiv 1 \pmod{4}$ then the sum is $\pm\sqrt{n}$ and if $n\equiv 3 \pmod{4}$ then the sum is $\pm\sqrt{n}i.$ – minar Aug 27 '13 at 20:33
Related question: math.stackexchange.com/questions/90541/… – minar Aug 27 '13 at 20:43
I would like to consider this for a general filed $K$ not necessarily $mathbb C$. Is the same computation true? – Snow Aug 27 '13 at 21:47
Since it is in fact true over $\bar{\mathbb{Q}}$, the computation should transfert to quite a lot of cases, including finite fields or $p$-adic. – minar Aug 28 '13 at 7:36