1

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?

Robert Z
  • 145,942
iam_agf
  • 5,438
  • Take primes $p$ of the form $4k+1$, and see what you get. Take primes of the form $4k+3$ and see what you get. Use the fact that the number of terms is odd on the right side in one case, and even in the other. – Sarvesh Ravichandran Iyer Oct 19 '16 at 06:48

1 Answers1

3

By Prove $\binom{p-1}{k} \equiv (-1)^k\pmod p$, we have that \begin{align*}2^p-2 &=\sum_{k=1}^{p-1}\binom{p}{k}=p\sum_{k=1}^{p-1}\binom{p-1}{k-1}\frac{1}{k}\equiv p\sum_{k=1}^{p-1}\frac{(-1)^{k-1}}{k}\\ &=p\sum_{j=1}^{(p-1)/2}\frac{-1}{2j}+p\sum_{j=1}^{(p-1)/2}\frac{1}{2j-1}\\ &=-p\sum_{j=1}^{(p-1)/2}\frac{1}{2j}+p\sum_{j'=1}^{(p-1)/2}\frac{1}{p-2j'}\\ &\equiv-p\sum_{j=1}^{(p-1)/2}\frac{1}{2j}-p\sum_{j'=1}^{(p-1)/2}\frac{1}{2j'}\\ \\&=-p\sum_{j=1}^{(p-1)/2}\frac{1}{j} \equiv-p\sum_{j=1}^{(p-1)/2}j^{p-2} \pmod{p^2} \end{align*} where in the last step we used the Fermat's little theorem.

Robert Z
  • 145,942