Quadratic Gauss sum
= Quadratic Gauss sum
{c}
{title2=$G(\chi)$}
{wiki}
For $\omega=e^{2\pi i/p}$ and the <Legendre symbol> $\chi$, the quadratic Gauss sum is
$$
G(\chi)=\sum_{a=1}^{p-1}\chi(a)\omega^a.
$$
It equals $\sqrt p$ for $p\equiv1\pmod4$ and $i\sqrt p$ for $p\equiv3\pmod4$ with the standard choice of square root.