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?
Hint: $$\phi(2p)=\phi(p)$$ for all odd primes where $\phi$ is the Euler-phi function.
Edit:
$$a^{\phi(2p)}\equiv a^{\phi(p)}\equiv a^{p-1}\equiv 1 \pmod {2p}$$
Hence $a^p\equiv a$ and $a^{p-1}\equiv 1 \Rightarrow a^{2p-1}\equiv a \pmod {2p}$.