A sum of some Legendre symbols is $\equiv 0 \mod p$

79 Views Asked by At

Let $p \gt 5$ be a prime number. Then

$$ \sum_{a = 1}^{\frac{p - 1}{2}} \left( \frac{a}{p} \right) a ^2 \equiv 0 \mod p ?$$

(Where $\left( \frac{a}{p} \right)$ is the Legendre symbol mod. p.)

I could show that $$ \sum_{a = 1}^{p - 1} \left( \frac{a}{p} \right) a ^2 = (1 - (-1)^{\frac{p-1}{2}})\sum_{a = 1}^{\frac{p - 1}{2}} \left( \frac{a}{p} \right) a ^2, $$ and $$ \sum_{a = 1}^{p - 1} \left( \frac{a}{p} \right) a ^2 \equiv 0 \mod p .$$

So if $p \not\equiv 1 \mod 4$, then ok.

But what about the case $p \equiv 1 \mod 4$?