Exponents and mod arithmetic

88 Views Asked by At

Is it true that if $a\equiv b \bmod n$, the $c^a \equiv c^b \bmod n$? I'm not quite sure how to prove this myself.

3

There are 3 best solutions below

3
On

Counterexample:

$$3\equiv0 \mod 3$$

But

$$2^3 \not \equiv 2^0 \mod 3$$

0
On

A counterexample:

Consider when $n = 15$, and $2 \equiv 17 \bmod 15$. Then $2^2 \equiv 4 \bmod 15$ compared to $2^{17} \equiv 2 \bmod 15$ (and this last one is easy because $2^8 \equiv 1 \bmod 15$ by Euler's theorem).

0
On

You've seen in other answers (mixedmath's and arbautjc's, for example) that this isn't true. However, there is something similar that is true.

For a PRIME $n$ and integer $m$, we have,

$$a = b + m(n-1)$$

implies

$$c^a \equiv c^b \mod n$$