Let $p>2$ be a prime number. I would like to show that
$$p \equiv 3 \pmod 4 \iff \sum_{x\in\mathbb{F}_p} \left(\dfrac{x^3-x}{p} \right)=0$$
where $\left(\dfrac{\cdot}{p} \right)$ denotes the Legendre symbol mod $p$.
I know that $\sum_{y\in\mathbb{F}_p} \left(\dfrac{y}{p} \right)=0$, but here $y(x)= x^3-x$ doesn't give a bijection $\Bbb F_p \to \Bbb F_p$ (otherwise we would have been done). I was trying to use the multiplicativity of Legendre symbol, but a factorization like $x(x-1)(x+1)$ didn't help me a lot.
Any comment would be helpful. Thank you!
With the transformation $x \mapsto p-x$, we find
$$\sum_{x \in \mathbb{F}_p} \biggl(\frac{x^3-x}{p}\biggr) = \sum_{x\in \mathbb{F}_p} \biggl(\frac{-1}{p}\biggr)\biggl(\frac{x^3-x}{p}\biggr).$$
For $p \equiv 3 \pmod{4}$, we have $\bigl(\frac{-1}{p}\bigr) = -1$, and it follows that the sum is $0$. For $p \equiv 1 \pmod{4}$, the transformation shows that
$$\sum_{x \in \mathbb{F}_p} \biggl(\frac{x^3-x}{p}\biggr) = 2\sum_{x = 1}^{\frac{p-1}{2}} \biggl(\frac{x^3-x}{p}\biggr).$$
But since $1^3 - 1 = 0$, we have
$$\sum_{x = 1}^{\frac{p-1}{2}} \biggl(\frac{x^3-x}{p}\biggr) = \sum_{x = 2}^{\frac{p-1}{2}} \biggl(\frac{x^3-x}{p}\biggr) \equiv 1 \pmod{2},$$
so the sum over all $x$ does not vanish.