1

Prove $a \equiv b \pmod{c} \implies a^n \equiv b^n \pmod{c}$.

Here is my proof, which I'm slightly doubtful I've done correctly:

Suppose

$a \equiv b \pmod{c}$ and $d \equiv e \pmod{c}$

We have:

$a-b=ck$ and $d-e=cs$

$a=ck+b$ and $d=cs+e$

And hence:

$$ad=(cs+e)(ck+b)=c^2sk+cab+eck+eb$$

$$=c(csk+ab+eck)+eb$$

Therefore,

$$ad-eb=cn$$

$$ad \equiv eb \pmod{c}$$

The special case $d=a^{n-1}$ and $e=b^{n-1}$ through induction is reduced to:

$$a^n \equiv b^n \pmod{c}$$

For $n \geq 1$

Induction:

If $n=1$, then by the proof above $a=b \pmod{c}$ implies $a^2=b^2 \pmod{c}$. Assume that $a^{n-1}=b^{n-1} \pmod {c}$ is true, then we have by the proof above: $a^{n}=b^{n} \pmod{c}$. Hence because we proved $a^{2}=b^{2} \pmod{c}$, $a^{3}=b^{3} \pmod{c}$. And because of this $a^{4}=b^{4} \pmod{c}$. And because of this $a^{5}=b^{5} \pmod{c}$. Etc..

Is my proof valid? Because this question is more of a yes or no one, a different proof would also a nice supplement to the answer (or just a nice answer) if you wish to provide one.

3 Answers3

4

Your proof is correct but not the most concise.

Here is a more concise proof: By factoring rule: $a^n-b^n = (a-b)(a^{n-1}+a^{n-2}b+...+ab^{n-2}+b^{n})$

Since $c|a-b$, $c|(a^n-b^n)$

Zau
  • 3,909
  • 12
  • 29
3

Hint: $(a^n-b^n)=(a-b)(a^{n-1}+\dots+b^{n-1})$

Myshkin
  • 35,974
  • 27
  • 154
  • 332
2

Since $a\equiv b \bmod c$, we have $c \mid (b-a)$. Set $k=b-a$

then $$b^n = (a+k)^n = \sum_{i=0}^n {n\choose i} k^ia^{n-i}$$

The first term is just $a^n$, so

$$b^n-a^n = \sum_{i=1}^n {n\choose i} k^ia^{n-i}$$

Now every term in the sum is divisible by $k$, giving $k\mid (b^n-a^n)$, and $c\mid k$, so $$c\mid (b^n-a^n)\qquad\implies\qquad b^n\equiv a^n \bmod c$$

Joffan
  • 39,627
  • For an alternative to the factorization magic :-) – Joffan Jul 11 '16 at 13:55
  • I'd love to know why the downvote - if an error, so I can correct it, or if something is unclear, so I can explain it. Note that the question explicitly asks for other proofs. – Joffan Jul 11 '16 at 17:14