# Show that there does not exist any $n$ for which $a^n=a$ forall $a\in \Bbb Z_m$ where $m$ is divisible by the square of some prime.

Show that there does not exist any $n$ for which $a^n=a$ forall $a\in \Bbb Z_m$ where $m$ is divisible by the square of some prime.

Suppose such $n$ exists and $m=p^2k$ for some prime $k$.

then $a^n=a$. Also $ma=0\implies p^2k a=0$

How to derive a contradiction from here?

• what about $n=1$? – Vasya Oct 5 '17 at 20:03

There does not exist $n>1$ such that $a^n \equiv a \bmod m$ for all $a \in \mathbb Z$
For all $n>1$, there is $a \in \mathbb Z$ such that $a^n \not\equiv a \bmod m$
It is enough to prove this for $m=p^2$, with $p$ prime.
Indeed, if $n>1$, then $a=p$ works because $p^n \equiv 0 \bmod p^2$ and so $p^n \not\equiv p \bmod p^2$.