If $p \mid m^p+n^p$ prove $p^2 \mid m^p+n^p$

Solution 1:

Since you know that $p^2 \mid (m+n)^p$, you need to see that $p^2 \mid \left((m+n)^p - m^p - n^p\right)$. So look at

$$(m+n)^p - m^p - n^p = \sum_{k=1}^{p-1} \binom{p}{k}m^{p-k}n^k.$$

You know that each of the binomial coefficients is a multiple of $p$. And you know that $n \equiv -m \pmod{p}$, so

$$(m+n)^p - m^p - n^p \equiv \sum_{k=1}^{p-1} \binom{p}{k} (-1)^k m^p \pmod{p^2}.$$

Now the symmetry of the binomial coefficients helps.

Solution 2:

Note, you can generalize:

If $d$ is odd, and $d\mid m+n$ then $d^2\mid m^d+n^d$.

Proof:

Let $k$ be such that $n = dk-m$. Then $$m^d + n^d = m^d+(dk-m)^d = \sum_{i=1}^d \binom d i (dk)^i(-m)^{d-i} \equiv \binom d 1 (dk)^1(-m)^{d-1}\pmod {d^2}$$

But $\binom d 1 = d$, so this means $d^2\mid m^d+n^d$.

Your particular problem follows since if $p\mid m^p+n^p$ then $p\mid m+n$.

Even more generally:

If $D$ is odd and $d\mid \gcd(D,m+n)$ then $d^2\mid m^D+n^D$.

Solution 3:

Hint: Use that $p\mid C_p^k$ for $0<k<p$