By dividing numbers $1^p, 2^p, 3^p,..., (p - 1)^p$ with $p^2$, prove, that the sum of all remainders is ${p^3 - p^2 \over 2}$, if $p$ is a prime number greater than $2$.
I tried to use the binomial theorem, but failed to do so. Any ideas?
By dividing numbers $1^p, 2^p, 3^p,..., (p - 1)^p$ with $p^2$, prove, that the sum of all remainders is ${p^3 - p^2 \over 2}$, if $p$ is a prime number greater than $2$.
I tried to use the binomial theorem, but failed to do so. Any ideas?
Since $p$ is odd, binomial theorem says:
$$\begin{align}(p-a)^p &= \sum_{k=0}^{p} \binom{p}{k}p^{k}a^{p-k}\\ &\equiv\binom{p}{1}p^1a^{p-1}-a^{p}\pmod{p^2}\\ &\equiv -a^p\pmod{p^2}\end{align}$$
So:
$$a^p+(p-a)^p \equiv 0\pmod{p^2}$$
But that means the remainder of $a^p$ and $(p-a)^p$ must add up to $p^2$ (since the remainders are all $<p^2$.)
There are $\frac{p-1}{2}$ pairs $a,p-a$, so you get that the sum of the remainders is $p^2\cdot\frac{p-1}{2}=\frac{p^3-p^2}{2}$.