1. Divisibility

Could someone help me prove the following using congruences?

Prove that a number n is divisible by 7 if and only if n' − 2n0 is divisible by
7 where n0 is the last digit and n' is the number obtained from n by deleting
the last digit.

Thanks.
Jimmy

2. Hello, Jimmy!

Could someone help me prove the following using congruences?

Prove that a number n is divisible by 7 if and only if n' − 2n_o is divisible by 7
where n_o is the last digit and n' is the number obtained from n by 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.