Show the rule of the divisibility for 7

#### Question

#### Answer

The rule of the divisibility for 7 says that if a number is divisible by 7, the number that is the difference between the number that is made by removing the last digit and the number that is the double of the last digit must be divisible by 7.

For example, 532, doubling the last digit gives 4, subtracting 4 from 53 gives 49, which is divisible by 7. Therefore, 532 must be divisible by 7. place values of the last two digits are 50 and 2, which are summed up to 52.

532 \div 7=76

Then how to prove the rule in general form?

Let’s first evaluate 4-digit number that is denoted as \overline{abcd}, in which a, b, c, d are three digits at hundreds, tens and ones places respectively. Since a number can be expressed as the sum of its place values, \overline{abcd} is rewritten as

\overline{abcd}= 1000a+100b+10c+d

If \overline{abcd} is divisible by 7, subtract 21 or multiples of 21 (e.g. 21d) from the number, the result is also divisible by 7.

\overline{abcd} -21d

=1000a+100b+10c+d-21d

=1000a+100b+10c-20d

=10(100a+10b+c-2d)

=10(\overline{abc}-2d)

Since 10 and 7 is prime to each other, if \overline{abcd} is divisible by 7, \overline{abc}-2d must be divisible by 7.

Now it’s clear that if the quotient remains as integer, the sum of place values of the last two digits must be divisible by 4, that is, 10c+d is divisible by 4.

In a more general form, any integer can be expressed as

\overline{a_na_{n-1}\dots a_1a_0}=a_n10^n+a_{n-1}10^{n-1}+\dots+a_210^2+a_110+a_0

\overline{a_na_{n-1}\dots a_1a_0}-21a_0

=a_n10^n+a_{n-1}10^{n-1}+\dots+a_210^2+a_110-20a_0

=10(a_n10^{n-1}+a_{n-1}10^{n-2}+\dots+10a_2+a_1-2a_0)

=10( \overline{a_na_{n-1}\dots a_2a_1} -a_0)

Now we have verified that for any integer, if it is divisible by 7, subtract the double of the last digit from the the number that is made by removing the last digit, the difference must be divisible by 7.