# $\left( \frac{1 \cdot 2}{p} \right) + \left( \frac{2 \cdot 3}{p} \right) + \cdots + \left( \frac{(p-2)(p-1)}{p} \right) = -1$

Let $p$ be an odd prime number. Prove that $$\left( \frac{1 \cdot 2}{p} \right) + \left( \frac{2 \cdot 3}{p} \right) + \left( \frac{3 \cdot 4}{p} \right) + \cdots + \left( \frac{(p-2)(p-1)}{p} \right) = -1$$ where $\left( \frac{a}{p}\right)$ is the Legendre symbol.

This seems to be a tricky one! I've tried using the property $\left( \frac{ab}{p} \right)=\left( \frac{a}{p}\right) \left( \frac{b}{p} \right)$ and prime factoring all the non-primes but to no avail. I had a quick thought of induction haha, but that was silly. I tried factoring the common Legendre symbols like $\left( \frac{3}{p}\right) \left[ \left( \frac{2}{p} \right) + \left( \frac{4}{p} \right) \right]$ but that didn't bring anything either. And I've been looking for pairwise cancellation with $1$ term leftover, but that does not seem to work.

Can you help?

• If $p=3$, you only have $\left(\frac23\right)=1$, which is false.Am I missing something? – chubakueno Nov 5 '13 at 4:54
• I apologize, the sum should be $-1$ and not $1$. Edited! – Numbersandsoon Nov 5 '13 at 15:16

Let $a^\ast$ be the inverse of $a$ modulo $p$. Then $$\left(\frac{a(a+1)}{p}\right)=\left(\frac{a(a+aa^\ast)}{p}\right)=\left(\frac{a^2(1+a^\ast)}{p}\right)=\left(\frac{1+a^\ast}{p}\right).$$
As $a$ ranges from $1$ to $p-2$, the number $1+a^\ast$ ranges, modulo $p$, through the integers from $2$ to $p-1$. But the sum from $1$ to $p-1$ of the Legendre symbols is $0$, so our sum is $-1$.