Congruences: Exponent cancelation law?

116 Views Asked by At

Is this valid?

If $a^n \equiv b^n \pmod n \Rightarrow a \equiv b \pmod n $

1

There are 1 best solutions below

1
On

No,

$$a^n \equiv b^n \pmod n \Rightarrow a \equiv b \pmod n$$ is not valid.

As Tobias writes in the comments, take the counterexample $$n = 4, a = 1, b = 3$$

$$1^4 \equiv 3^4 \pmod 4 \iff 1\equiv 81\pmod 4 \not\Rightarrow 1\equiv 3 \pmod 4$$

If you add the additional restriction on $n$ that $n$ be prime, then the implication is true.