A peculiar trigonometric sums with squares and Legendre symbols

69 Views Asked by At

Let $p$ be a prime number of form $8k + 1$. Let $C(p) :=\sum_{k = 0}^{p-1} \cos{\left( \frac{-2k^2 \pi}{p}\right)} \cdot \left( \frac{k}{p} \right)$ where $\left( \frac{k}{p} \right)$ is the Legendre symbol. I claim that

If $p$ is of form $(4n + 1)^2 + (4m)^2$ for natural $n, m$, then $C(p) = \sqrt{2p - 2(4n+1)\sqrt{p}}$

and

If $p$ is of form $(4n+3)^2 + (4m)^2$ for natural $n, m$ then $C(p) = \sqrt{2p + 2(4n+3)\sqrt{p}}$

Similar result holds for primes of form $8k + 5$, let $S(p) :=\sum_{k = 0}^{p-1} \sin{\left( \frac{-2k^2 \pi}{p}\right)} \cdot \left( \frac{k}{p} \right)$. Then

If $p$ is of form $(4n + 1)^2 + (4m + 2)^2$ for natural $n, m$, then $S(p) = \sqrt{2p + 2(4n+1)\sqrt{p}}$

and

If $p$ is of form $(4n+3)^2 + (4m + 2)^2$ for natural $n, m$ then $S(p) = \sqrt{2p - 2(4n+3)\sqrt{p}}$

Is this result known? If so, could you give me a link to a paper with its proof?