Divisibility by seven rules

Method #1: Decatenate, multiply, subtract

Detach the last digit from the rest of the number. Double said digit, then subtract it from what remains of the original number.

Starting with the number \(392\):

\(2\times2 = 4\)
\(39 - 4 = 35\)

If the result of the subtraction is divisible by 7, so is the original number.

Method #2: Decatenate, multiply, add

Detach the last digit from the rest of the number. Quintuple the digit and add it to the rest of the number.

\(392\)
\(39 + 10 = 49\)

If the result of the addition is divisible by 7, so is the original number.

Method #3: Decatenate, multiply, add (version 2)

Detach the last two digits. Multiply the rest of the number, then add it to the last two digits. If the result of the addition is divisible by 7, so is the original number.

\(5978\)
\(59\times2 + 78 = 196\)

Method #4: Alternating sum

This works for longer numbers. Split the number into chunks of three, starting from the right — starting with \(13233146297\), you get:

\(297\)
\(146\)
\(233\)
\(13\)

Now form an alternating sum, starting with subtraction:

\(297-146+233-13 = 371\)

If the result is divisible by seven, so is the original number. Specifically, the result keeps the modulo of the original number, so if the original number is \(7n+x\) for any integer \(x\), the result will also be \(7n+x\) for the same \(x\).

Method #5: Multiply digits and add

Starting from the right, multiply each digit by the next number in this sequence: \(1, 3, 2, -1, -3, -2\). If there are more than six digits, start again from \(1\) once you reach the millions place. Add the products. If the result of the multiplication is divisible by seven, so is the original number.

\(688751\)
\((1\times1) + (5\times3) + (7\times2) + (8\times-1) + (8\times-3) + (6\times-2) = -14\)

Method #6: Brute force

Add or subtract a known multiple of seven until you get something easier to work with. Starting from \(24433430\):

\(24433430−(7000000\times3)=3433430\)
\(3433430\div7=490490\)