I am a beginner in modular mathematics. I can't figure out is $$a^b \bmod m = (a \bmod m)^{(b \bmod m)} \bmod m$$
If this is the case, can you please give me some hint how to prove this?
Thanks!
I am a beginner in modular mathematics. I can't figure out is $$a^b \bmod m = (a \bmod m)^{(b \bmod m)} \bmod m$$
If this is the case, can you please give me some hint how to prove this?
Thanks!
I think what you are asking is in effect, "if $a\equiv a_1\pmod m$ and $b\equiv b_1\pmod m$ then is $a^b\equiv a_1^{b_1}\pmod m$?"
The answer is no: $2\equiv 5\pmod 3$, but $2^2\not\equiv 5^5\pmod 3$.