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?

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

1 Answer 1


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$.

  • $\begingroup$ Ahhhh, whenever we have congruences modulo some prime, always consider modular inverses!!! And as you said, the sum should be -1 (now edited). Thank you, André Nicolas!! $\endgroup$ Nov 5, 2013 at 14:58
  • $\begingroup$ You are welcome. I have removed the now irrelevant last sentence. $\endgroup$ Nov 5, 2013 at 15:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .