I've been wondering about this for a while:
for which values of $m$ is $a^k\equiv a\pmod m$ for all $0\le a<m$. I know that $m=6$ works.
I meant $k$ is odd (for the $m=6$ case). Sorry about that.
I've been wondering about this for a while:
for which values of $m$ is $a^k\equiv a\pmod m$ for all $0\le a<m$. I know that $m=6$ works.
I meant $k$ is odd (for the $m=6$ case). Sorry about that.
Assuming that $k$ is fixed and $k$ is not $1$. This reduces your question to one of reciprocity.
You are asking whether $(a/m)_{k-1} =1$ or not. If you examine a primitive character mod $m$ you need to know its order, and its order would divide $\phi(m)$, but there is not character $\chi$ such that $\chi(a)=1$ for all $a (\mod m)$ (unless it is the primitive character) hence there are no such values of m, unless m=1.
I am sorry about my previous answer, there was an error, in there.
The values of such m are those of the form $m=2p$ where $p$ is some odd prime. this is because $\varphi(m)=\varphi(p)$ and so the value of $k$ in your problem will always be $p$ hence you would have $a^p\equiv a(\mod 2p)$