Proof for divisibility by $7$

$$5(\overline{a_1a_2\ldots a_n})=50(\overline{a_1a_2\ldots a_{n-1}})+5a_n=\overline{a_1a_2\ldots a_{n-1}}-2a_n\pmod{7}$$


Let $x$ be the number you gave, with the full $n$ digits, and let $y$ be the number whose decimal representation is obtained by removing the last digit, namely $a_n$, of $x$.

The following equation is clear: $$x=10y +a_n.$$

Note that $10y +a_n$ is divisible by $7$ iff $20y+2a_n$ is divisible by $7$.

But $20y+2a_n$ is divisible by $7$ iff $-y+2a_n$ is divisible by $7$ (I subtracted $21y$), and this is the case if and only if $y-2a_n$ is divisible by $7$. That's exactly what we wanted to show.

We can write the above stuff using the language of congruences if we wish.

About iff: I slipped into jargon. The word (?) "iff" abbreviates "if and only if."


HINT $\rm\qquad 7\ |\ 10\ y + x\ \iff\ 7\ |\ y-2\ x\ \ \:$ since $\rm\:\ -2\ (10\ y + x)\ \equiv\ y - 2\ x\ \ (mod\ 7)$

i.e. lines $\rm\ -10\ y = x\ $ and $\rm\ y = 2\ x\ $ are equivalent over $\rm\:\mathbb Z/7\:,$ differing by a unit scaling (of $2$).


Regarding divisibility by 7 I created an algorithm that must be applied repetitively to each period of a large number. If the last sum results in a multiple of 7 then the tested number is also a multiple of 7, otherwise it is not. The sum of each period must be added to the sum of the next period.

N = abc

algorithm: – ( (x) + a + b + c + (y) ) mod 7

(x) must be mentally inserted before the hundreds and (y) must be mentally inserted after the ones in such a way that 7 divides both (x)a and c(y). In this rule no digits are inserted before or after the tens.

Numerical examples:

1) N = 462; – ( (1) + 4 + 6 + 2 + (1) ) mod 7 ≡ Ø

2) N = 863; – ( (2) + 8 + 6 + 3 + (5) ) mod 7 ≡ 4

3) N = 1.554; – ( 1 + (4) ) mod 7 ≡ 2; – ( 2 + (3) + 5 + 5 + 4 + (2) ) mod 7 ≡ Ø

4) N = 68.318; – ( 6 + 8 + (4) ) mod 7 ≡ 3; – ( 3 + (6) + 3 + 1 + 8 +(4) ) mod 7 ≡ 3

5) N = 852.655; – ( (2) + 8 + 5 + 2 + (1) ) mod 7 ≡ 3; – ( 3 + (5) + 6 + 5 + 5 + (6) ) mod 7 ≡ 5

To determine the remainder take the digit that forms with the last sum a multiple of 7. Remainders of the second, fourth and fifth examples:

2) Last sum is 4 → 4(2); 2 is the remainder 4) Last sum is 3 → 3(5); 5 is the remainder 5) Last sum is 5 → 5(6); 6 is the remainder

The application of this rule must be performed in a dynamic way. It is not necessary to write the inserted numbers; all you need is to add the written numbers and the mentally inserted numbers at sight, determine the difference of each sum and its next multiple of 7 (inverse additive) and go ahead till the value of the last inserted digit is added.

The bureaucratic application of the algorithm certainly will not be as quick as its dynamic application.

The rule works because before the use of the inverse additive the values of the digits of the first three digits are multiplied respectively by 3, 1 and 5; after the inverse additive the multipliers change to 4, 6 and 2. Each group of 6 digits of a number are multiplied by 4,6,2,3,1 and 5. These are the remainders determined by Pascal’s criterion regarding divisibility by 7.

In my blogspot I explain how easy is to create new real rules for divisibility by 7 and other aspects of my research. This is the first real rule for divisibility by 7 created by me.

English is not my native language and I am not a Mathematician.