# Are the divisibility tests rooted in number theory?

I had a good look at some mathematics I was doing at age 9. I remembered the divisibility tests we used to do and I thought that I could take a shot at proving them.

I managed to prove it for 3.

It is usually stated as follows:

If the sum of digits of a number is divisible by 3, then the number is divisible by 3.

This one is not that hard.

$$10 \bmod 3=1 \implies (k \cdot 10^n) \bmod 3 \equiv k$$ for $$n \in \mathbb{N}$$ and any one-digit number $$k$$

The divisibility of a number by 3 can therefore be contingent on the sum of it's digits.

My question is, how would you prove the divisibility tests for 7 and 11? And can you then create any divisibility test you want?

• $7, 11,$ and $13$ are factors of $1001$ – J. W. Tanner Mar 24 '20 at 19:02
• See for example this post. – Dietrich Burde Mar 24 '20 at 19:05
• math.stackexchange.com/questions/328562/… – lab bhattacharjee Mar 24 '20 at 19:10
• Partition $N$ into 3 digit numbers from the right ($d_3d_2d_1,d_6d_5d_4,\dots$). The alternating sum ($d_3d_2d_1 - d_6d_5d_4 + d_9d_8d_7 - \dots$) is divisible by 7, 11, or 13 if and only if $N$ is divisible by 7, 11, or 13, respectively – J. W. Tanner Mar 24 '20 at 19:25
• @ J.W. Tanner Got it, thanks – Nεo Pλατo Mar 24 '20 at 20:01

You can find a very good reference of the divisibility by $$11$$ at this page: https://artofproblemsolving.com/wiki/index.php/Divisibility_rules/Rule_for_11_proof While the divisibility by $$7$$, is explained here: https://artofproblemsolving.com/wiki/index.php/Divisibility_rules#Divisibility_Rule_for_7
$$7\times11\times13=1001,$$ so $$1000\equiv-1\bmod 7,11,13$$,
so the following test works for divisibility of $$N$$ by $$7, 11,$$ and $$13:$$
partition $$N$$ into 3 digit numbers from the right $$(d_3d_2d_1,d_6d_5d_4,…).$$
The alternating sum $$(d_3d_2d_1−d_6d_5d_4+d_9d_8d_7−…)$$ is divisible by $$7, 11,$$ or $$13$$
if and only if $$N$$ is divisible by $$7, 11,$$ or $$13,$$ respectively