If p is an odd prime, prove that $a^{2p-1} \equiv a \pmod{ 2p}$ Let $m = 2p$
If p is an odd prime, prove that $a^{2p - 1} \equiv a \pmod {2p} \iff a^{m - 1} \equiv a \pmod m$.
I have no idea on how to start. I was trying to find a form such that
$a^{m - 2} \equiv 1 \pmod m$. But I got stuck. Can someone give me a hint here?

By the chinese remainder theorem, congruence modulo $2p$ is uniquely determined by modulo $p$ and modulo $2$ together (this is true for any odd number $p$).
By Fermat's small theorem, we have $a^{2p-1} = a^p\cdot a^{p-1} \equiv a\cdot 1 =a\pmod p$. This is true for any prime $p$. Also, we must have $a^{2p-1} \equiv a\pmod 2$, since that's true for any natural exponent. Therefore, we have
$$
a^{2p-1} \equiv \begin{cases}a \pmod p\\ a \pmod 2\end{cases}
$$
which gives the desired $a^{2p-1} \equiv a \pmod {2p}$.
