Can you substitute equivalent powers?

43 Views Asked by At

Sorry for the rather vague title, but I don't know how to phrase it. My question is: if a ≡ b (mod m), may i substitute b wherever a is used as a power? i.e., if I have 4^(105), where my modulus is 105, may I say 4^105 ≡ 4^0 = 1 (mod 105)?

1

There are 1 best solutions below

3
On

no, you cant, as $2^3=8 \equiv 2 \not\equiv 1=2^0 \pmod 3$

However, with Fermat's small theorem, if $p$ is prime,$n^p \equiv n\pmod p$ so if $a \equiv b\pmod p$ and $x \equiv y\pmod{ \color{red}{p-1}}$, then $a^x \equiv b^y\pmod p$