# Showing $|\sum_{k=1} ^n e^{\frac{2 \pi i k^2}{n}}| = \sqrt{n}$

I would like to show the above result, with as little brute forcing as possible (i.e. trying to avoid a clunky induction).

Upon expanding the LHS, we see

$|\sum_{k=1} ^n e^{\frac{2 \pi i k^2}{n}}|^2 = n + 2 \sum_{ p<q} cos( 2 \pi /n (p^2 -q^2))$ so we wish this summand to be 0, but I don't know if this leads to an easier problem to solve.

I would like to try use some more general ring properties- perhaps the ring generated by the $\{ e^{\frac{2 \pi i k^2}{n}} \}$ under the usual $+, \times$ forms a lattice which relates to the $n$ somehow as a distance of points (this is the only way I see how to relate the norm to the ring directly), but this again is just speculation I don't see how to use.

• You probably need to assume $n$ is odd. The expression $|\cdots| = \sqrt{n}$ is false for all even $n$ I have tried. Aug 18, 2017 at 11:37
• This is the Gauss sum. For example the sum is zero for $n=4k+2$. Aug 18, 2017 at 11:54
• See Gauss sum. For $p$ prime you can define $\chi(n)= (\frac{n}{p})$ the Legendre symbol and show it is its own discrete Fourier transform. For $p$ non-prime it is more complicated as a product of two quadratic non-residues doesn't have to be a square. Aug 18, 2017 at 13:44