Show $a^p \equiv a \mod 2p$

230 Views Asked by At

I've stucked at the following problem:

Let $p$ be an odd prime number. Show that for all $a\in\mathbb{Z}$

$$a^p \equiv a\ (\mathrm{mod}\ 2p)$$

How can I prove it? I know within Fermat's theorem that $a^p \equiv a\ \mathrm{mod}\ p$.

2

There are 2 best solutions below

0
On

Yes, and equivalently Fermat's theorem says that $p$ divides $a^p-a$. However, note that $a^p-a$ is also an even number, hence $2$ divides it as well. And this implies that $lcm(2,p)$ must divide $a^p-a$. But $2,p$ are coprime, so their $lcm$ is $2p$.

0
On

Using the constant case of the Chinese remainder theorem,

$a^p\equiv a\pmod {2p}$ because $a^p\equiv a\pmod p$ and $a^p \equiv a \pmod 2$.