Given an odd prime $p$ how can I prove that $$1^{p-2}+2^{p-2}+ \dots +\left(\frac{p-1}{2}\right)^{p-2}\equiv \frac{2-2^p}{p} \pmod{p}$$
I wanted to prove that all the numbers are negative powers of 2, but I don't know if that is correct. Anyone has an idea?