Quadratic gauss sum equivalence of definition Let $r$ be a prime number and $\zeta_r$ be the $r$th rot of unity. I know quadratic gauss sum can be expressed in two ways, $g=\sum_{i=0}^{r-1}\zeta_r^{i^2}$ and $g=\sum_{i=0}^{r-1}(\frac{i}{r})\zeta_r^{i}$
$g$ being the sum. But I am not getting how to go from the first definition to the second. Can anyone help?

The connection is
$$
g=\sum_{i=0}^{r-1}\zeta_r^{i^2}=\sum_{i=0}^{r-1}\left(1+\left(\frac ir\right)\right)\zeta_r^i=\sum_{i=0}^{r-1}\zeta^i+\sum_{i=0}^{r-1}\left(\frac ir\right)\zeta^i=0+\sum_{i=0}^{r-1}\left(\frac ir\right)\zeta^i=\sum_{i=0}^{r-1}\left(\frac ir\right)\zeta^i
$$
where $\sum_{i=0}^{r-1}\zeta_r^{i^2}=\sum_{i=0}^{r-1}\left(1+\left(\frac ir\right)\right)\zeta_r^i$ as, $i^2\;(mod\;r)$ is a quadratic residue, and the sum only has the quadratic residues in the exponent of $\zeta_r$, each term is multiplied by $2$ as their are two solution of $x^2-a=0\;(mod\;r)$. So, now it can be easily seen that, two expressions are equivalent.
