Finding all primes $p,$ such that for all integers $a$, $a^{25} \equiv a\pmod p$.

85 Views Asked by At

Find all primes $p$ such that the following congruence holds for all integers $a$: $\quad a^{25}\equiv a\pmod{p}$.

I suspect there is a very simple solution, but I can't find it.

1

There are 1 best solutions below

3
On BEST ANSWER

Hint:

If $a$ is not divisible by $p$, it is equivalent to $a^{24}\equiv 1\pmod p$.

By lil' Fermat, this implies that $p-1$ divides $24$.