Hello, Jimmy!

Could someone help me prove the following using congruences?

Prove that a numbernis divisible by 7 if and only ifn' − 2n_ois divisible by 7

wheren_ois the last digit andn'is the number obtained fromnby deleting the last digit.

Let: n .= .10a + b, then: a = n' and b = n_o

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

[1] If n = 10a + b is divisible by 7, then a - 2b is divisible by 7.

We are given: . 10a + b .= .0 (mod 7)

Then: . . . . . . . . . .10a .= .-b (mod 7)

Or: . . . . . . . . . . . . 3a .= .6b (mod 7)

Multiply by 5: . . . . 15a .= .30b (mod 7)

Or: . . . . . . . . . . . . . a .= .2b (mod 7)

Hence: . . . . . . . a - 2b .= .7k for some integer k.

Therefore: .a - 2b is divisible by 7.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

[2] If a - 2b is divisible by 7, then n = 10a + b is divisible by 7.

We are given: . a - 2b .= .0 (mod 7)

Then: . . . . . . . . . . a .= .2b (mod 7)

Multiply by 10: . . 10a .= .20b (mod 7)

Or: . . . . . . . . . . 10a .= .6b (mod 7)

Add b: . . . . . 10a + b .= .7b (mod 7)

Then: . . . . . .10a + b .= .0 (mod 7)

Hence: . . . . . 10a + b .= .7k for some integer k.

Therefore: .n = 10a + b is divisible by 7.