# Show that the following sum of legendre symbols is -1.

Let. $p$ be an odd prime. Consider the following sum of Legendre Symbols:

$(\frac{1}{p})(\frac{2}{p}) + (\frac{2}{p})(\frac{3}{p}) + \cdots + (\frac{p-2}{p})(\frac{p-1}{p})$.

Show that this sum is equal to $-1$. Using the algebra of the Legendre symbol i can show that this sum is the same as

$\sum_{i = 2}^{\frac{p-1}{2}}(\frac{i-1}{p})(\frac{i}{p}) + (\frac{\frac{p-1}{2}}{p})(\frac{\frac{p+1}{2}}{p})$.

I can also show that this last term is equal to 1 if $p \equiv 1 \mod 4$ and $-1$ if $p \equiv 3 \mod 4$ via Guass' Lemma. I'm really more interested in a hint than a full solution but any help would be greatly appreciated.

With the assumptions $\left(\frac{0}{p}\right)=0$, $p\equiv 1\pmod{2}$, by exploiting the multiplicativity of the Legendre symbol we have
$$\sum_{k=1}^{p-2}\left(\frac{k}{p}\right)\left(\frac{k+1}{p}\right)=\sum_{k=1}^{p-2}\left(\frac{k^2+k}{p}\right)=\sum_{k=1}^{p-2}\left(\frac{1+k^{-1}}{p}\right)$$ where $k^{-1}$ stands for the inverse of $k$ in $\mathbb{F}_p^*$. Now it is enough to consider how that map $k\mapsto 1+k^{-1}$ acts on $\{1,2,\ldots,p-1\}$ and recall that $$\sum_{k=1}^{p-1}\left(\frac{k}{p}\right)=0,$$ i.e. that in $\mathbb{F}_p^*$ there are as many quadratic residues as quadratic non-residues.
• I'm little confused by the second inequality where we go from $k^2 + k$ to $1 + k^{-1}$. How do we know equality is preserved. – Sean Haight Oct 4 '16 at 22:11