<s>[INST] Sum of Residues Modulo $p^2$. Let $p$ be an odd prime. Prove that 
$$ \sum_{k = 1}^{p-1} k^{2p-1} \equiv \frac{p(p+1)}2 \pmod{p^2}$$
 [/INST] @user8268 (currently deleted) answer has the right idea, though there were algebraic errors. The idea is to group for $1 \leq k \leq \frac{p-1}{2}$
\begin{align}
k^{2p-1}+(p-k)^{2p-1} \equiv k^{2p-1}+[(2p-1)pk^{2p-2}-k^{2p-1}] &\equiv p(2p-1)k^{2p-2} \pmod{p^2} \\
&\equiv p(2p-1) \pmod{p^2}
\end{align}
where in the last step we have used $p \mid k^{2p-2}-1$ by Fermat's little theorem.
Thus 
\begin{align}
\sum_{k=1}^{p-1}{k^{2p-1}}=\sum_{k=1}^{\frac{p-1}{2}}{\left(k^{2p-1}+(p-k)^{2p-1}\right)} & \equiv \frac{p-1}{2}p(2p-1) \pmod{p^2} \\
& \equiv -\frac{p(p-1)}{2} \pmod{p^2}\\
&\equiv \frac{p(p+1)}{2} \pmod{p^2}
\end{align}
</s>