# Under which conditions does $a^n \equiv 1\mod(b) \Rightarrow\ a^{n^m} \equiv 1\mod(b)$? Can you prove it?

Under which conditions does $a^n \equiv 1\mod(b) \Rightarrow\ a^{n^m} \equiv 1\mod(b)$? What about viceversa?

What is the strongest result(s) that can be proved regarding this kind of thing?

I'm kind of getting stuck with following a passage in an example, and anyway I have a general confusion in my head about this which I haven't been able to dispel with googling, searching and grepping, hence asking as my last resort.

Thanks a lot.

For any $m\geq 1$, if $a^n\equiv 1\bmod b$, then $$a^{(n^m)}=a^{n\cdot (n^{m-1})}=(a^n)^{n^{m-1}}\equiv (1)^{n^{m-1}}\equiv 1\bmod b.$$
I am a silly person, because $a\equiv b\pmod{n}, c\equiv d\pmod{n} \Rightarrow ac\equiv bd\pmod{n}$ means that by substituting 1 for b and d and $a^n$ for a, c it can be shown that the first congruence holds.