# Thread: Number Theory

1. ## Number Theory

Help on this...

The digits of a five-digit number are MNOPQ. Prove that MNOPQ is divisible by 7 if and only of the number MNOP - 2 x Q is divisible by 7.

Thanks!

2. Originally Posted by mathisgood
Help on this...

The digits of a five-digit number are MNOPQ. Prove that MNOPQ is divisible by 7 if and only of the number MNOP - 2 x Q is divisible by 7.

Thanks!
Divisibility Tests -- from Wolfram MathWorld

3. Hello, mathisgood!

The digits of a five-digit number are $\displaystyle ABCDE.$
Prove that $\displaystyle ABCDE$ is divisible by 7 if and only of the number $\displaystyle ABCD - 2E$ is divisible by 7.

[1] Given: .$\displaystyle ABCDE$ is divisible by 7.
. . .Prove: .$\displaystyle ABCD-2E$ is divisible by 7.

We have: .$\displaystyle 10(ABCD) + E \;=\;7p\:\text{ for some integer }p.$

Subtract $\displaystyle 21E\!:\;\;10(ABCD) - 20E \;=\;7p - 21E \;=\;7(p - 3E)$

Divide by 10: . $\displaystyle (ABCD) - 2E \;=\;\frac{7(p-3E)}{10}$

Since $\displaystyle (ABCD)-2E$ is an integer, then $\displaystyle p-3E$ is a multiple of 10: .$\displaystyle 10k$

And we have: .$\displaystyle (ABCD) - 2E \;=\;\frac{7(10k)}{10} \;=\;7k$

Therefore: .$\displaystyle (ABCD)-2E$ is divisible by 7.

[2] Given: .$\displaystyle (ABCD)-2E$ is divisible by 7.
. . .Prove: .$\displaystyle ABCDE$ is divisible by 7.

We have: .$\displaystyle (ABCD) - 2E \;=\;7q\,\text{ for some integer }q$

. . . Then: .$\displaystyle (ABCD) \;=\;2E + 7q$

Multiply by 10: .$\displaystyle 10(ABCD) \;=\;20E + 7q$

. . Add $\displaystyle E\!:\;\;10(ABCD) + E \;=\;21E + 7q$

And we have: .$\displaystyle ABCDE \;=\;7(3E + q)$

Therefore: .$\displaystyle ABCDE$ is divisible by 7.