Congruence Modulo Powers of Primes I need help with the following:
Let $p$ be an odd prime and $x, y \in \mathbb{Z}$. Then $x \equiv y$ mod $p^k \implies x^p \equiv y^p$ mod $p^{k+1}$.
I know that I can write $x^p - y^p$ as $(x - y)F(x,y)$ for some ugly polynomial $F$, but I'm not sure whether that's too much help.
Ta
 A: Why not directly?:
$$x\equiv y\pmod{p^k}\implies x=y+mp^k\;,\;\;m\in\Bbb Z\implies$$
$$x^p=\sum_{n=0}^p\binom pny^n(mp^k)^{p-n}\;\;(**)$$
But all the binomial coefficients except the first one and the last one are dividisible by $\;p\;$ (either you know this or you can prove it by induction...) , so we get:
$$(**)=(\text{something divisible by}\;p^{k+1})+m^pp^{pk}+y^p=y^p\pmod{p^{k+1}}$$
since, of course, $\;pk>k+1\;$
A: Suppose $x \equiv y \pmod {p^k}$, for some positive integer $k$.

Note the identity
\begin{align*}
x^p - y^p &= (x - y)
\left(
x^{p-1} + x^{p-2}y + \cdots + xy^{p-2} + y^{p-1}
\right)\\[4pt]
&=(x - y)
\left(
\sum_{i=0}^{p-1}x^{p-1-i}y^i
\right)
\\[4pt]
\end{align*}
Then
\begin{align*}
&x \equiv y \pmod{p^k}\\[4pt]
\implies\; &x  \equiv  y \pmod{p}\\[4pt]
\implies\; &x^i  \equiv y^i \pmod{p},\;\;\text{for all nonnegative integers $i$}\\[4pt]
\end{align*}
Hence
\begin{align*}
\sum_{i=0}^{p-1}x^{p-1-i}y^i &\equiv  \sum_{i=0}^{p-1}x^{p-1-i}x^i \pmod{p}\\[4pt]
&\equiv \sum_{i=0}^{p-1}x^{p-1} \pmod{p}\\[4pt]
&\equiv px^{p-1} \pmod{p}\\[6pt]
&\equiv 0 \pmod{p}\\[4pt]
\end{align*}
Thus, $\displaystyle{\sum_{i=0}^{p-1}x^{p-1-i}y^i}$ is a multiple of $p$.

But also, by hypothesis, $x - y$ is a multiple of $p^k$, hence
\begin{align*}
&p^k\,|\,(x-y)\;\;\;\text{and}\;\;\, p\;{\large{|}}\left(\sum_{i=0}^{p-1}x^{p-1-i}y^i\right)\\[6pt]
\implies\; &p^{k+1}\;{\Large{|}} \left((x - y)
\left(
\sum_{i=0}^{p-1}x^{p-1-i}y^i
\right)\right)\\[6pt]
\implies\; &x^p - y^p \equiv 0 \pmod {p^{k+1}}\\[6pt]
\end{align*}
as was to be shown.

A point of interest: We never used the fact that $p$ is an odd prime, hence the same result holds for any positive integer $p$.
