The following rules refer only to divisibility by numbers relatively prime to 10. For rules for division by all numbers, (which are sometimes harder), see this page.

10a+b [1.1]

where b is non-negative integer less than 10: 0, 1, 2...9, and a is any positive integer. [Actually, 10a+b can be a negative integer, where 0>b>-10, and a is a negative integer, but here we think of non negatives for convenience in the knowledge that the negative version is easily obtained].

Here we consider numbers relatively prime to 10.

If Equation 1.1 is divisible by a number relatively prime to 10, p, such as 2, 3, 5..., then:

10a+b=0 mod

So:

b=-10a mod

The above is the same for both rules.

a+mb=0 mod

Substituting the value of b from 1.3 in 1.4:

a+m(-10a)=0 mod

Factorising:

a(1-10m)=0 mod

Now, 1.6 is divisible by p, if (1-10m) is.

(1-10m)=-(10m-1), so if (1-10m) is divisible by p, so is (10m-1), which is sometimes easier to use!

For instance, if p=7, then we need (10m-1) to be divisible by 7 (and we take the lowest value). If m=5, then:

1-10·5=49 (which is divisible by 7)

The rule for 7, is therefore: add 5 times the unit digit to the rest of the number, and if it is divisible by 7, then so is the number.

For instance, using the rule:

196 gives 5·6+19=49

So, 196 is divisible by 7.

10a+b=0 mod

So:

b=-10a mod

We seek a rule:

a-mb=0 mod

Substituting for b using Equation 1.3:

a-(m(-10a))=0 mod

Simplifying:

a+10ma=0 mod

Factorising:

a(1+10m)=0 mod

For the left-hand side to be divisible by p, the (1+10m) must be divisible by p. We search for the smallest m which makes (1+10m) divisible by p.

For instance, if p=7, then m=2 (1+10·2=21, which is divisible by 7)

Therefore the subtraction rule for 7 is: Double the last digit and add the rest of the number. If this is divisible by 7, then so is the number.

Example:

315 is divisible by 7 because 31-2·5=21, which is divisible by 7 (or 21 gives 2-2·1=0, which is divisible by 7)

For instance, in seeking the addition rule for 3, using (10m-1), we need to find a number multiplied by 3 which ends in 9. We find 9, itself. 9+1=10, so m=1.

In seeking the subtraction rule, using (10m+1), we seek a number which when multiplied by 3 ends in 1. 3*7=21, so m=2;

In seeking an addition rule for 13, using (10m-1), we seek a number which when multiplied by 13 ends in 9. 3*13=39. So m=4.

The subtraction rule for 13, using (10m-1), requires a number ending in 1... 13*7=91. So m=9.

10a+b≡N [1.3.1]

Where N and a are non-negative integers, and b is a non-negative integer less than 10 (or a and N are negative integers and b is a negative integer greater than -10).

If N is divisible by an integer p, then so is the left-hand side. If we write Equation 1.3.1 mod

10a+b≡0 mod

Dividing by 10, which we can do when p is prime (which is our assumption) so 10 and p are relatively prime:

a+b/10≡0 mod

So, if the original number is divisible by p, then [1.3.3] is true. We can write 1/10 as m

m

And

a+bm

For example, if p≡7, m

We can also have a subtraction rule where:

n

And

a-bn

For instance, if p=7

By adding [1.3.4] and [1.3.7], we get:

m

We can write:

m

because p mod p is 0. (we can write any multiple of p and get the same answer.)

Therefore, the sum of the factors for the addition rule and the subtraction rule is equal to p. This means that having discovered one of the factors, we can easily compute the other.

For instance,

with 7, the addition rule uses 5 and the subtraction rule uses 2, and 5+2=7!

m=1/10 mod p [1.3.8]

In other words:

10m=1 mod p

(Also m is called the multiplicative inverse in mod p)

If p=2 or p=5, then 10m mod p is zero. So these numbers cannot be used (because we require 10m mod p to be 1, not zero).

If p is an even number, then, because:

10m mod p=10m-qp [1.3.9]

where q is an integer, then because 10m and p are even, the difference will be an even number (and therefore cannot be equal to 1). For instance, 10 mod 8 is 2. There isn't a number, mod 8, which multiplied by 2 gives 1. (Actually there isn't a number at all, whatever the modulus!)

We can use our formula to find rules for checking divisibility of numbers which are not relatively prime to 10, that is, odd numbers except those ending in 5 or 0.

It is quite easy with practice to figure out these rules mentally using the above, although here I will mention another method. Let us consider 13. So we seek an m:

10m=1 mod

Looking at an extract from the mod 13 times table for 10:

Table Mod 13 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | |

10 | 0 | 10 | 7 | 4 | 1 | 11 | 8 | 5 | 2 | 12 | 9 | 6 | 3 |

11 | 0 | 11 | 9 | 7 | 5 | 3 | 1 | 12 | 10 | 8 | 6 | 4 | 2 |

12 | 0 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |

We note that 10·4=1 mod

So for the addition rule we multiply the units by 4 and add the rest of the number.

For the subtraction rule we want:

10m+1=0 mod

Or:

10m=-1 mod

-1 mod

And:

12·9=1 mod

So the subtraction rule is:

subtract 9 times the units figure from the rest of the number.

173 gives 17+4·3=29. 29 gives 2+4·9=38. 38 gives 3+4·8=35, which does not divide by 13 evenly so 173 doesn't have 13 as a divisor.

Subtraction rule:

173 gives 17-9·3=-10. 10 (the divisors of 10 and -10 are numerically the same!) gives 1-9·0=1, so it still doesn't divide by 13.

The purpose here is to exercise our new knowledge and not to find alternative formula in some practical way. The formula for Method 1 begin below.

We have used:

10a+b=N

Now, we might use:

100a+10b+c=N [1.4.1]

If N is divisible by p, then so is the left-hand side. So

100a+10b+c=0 mod p [1.4.2]

Dividing by 100:

a+b/10+c/100=0 mod p [1.4.3]

We can write 1.4.3 as:

a+bm

Where:

m

m

m

m

10 mod

100 mod

So the m's we seek are:

m

m

From the table below, we find:

m

m

Table Mod 7 | |||||||
---|---|---|---|---|---|---|---|

0 | 1 | 2 | 3 | 4 | 5 | 6 | |

0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 |

2 | 0 | 2 | 4 | 6 | 1 | 3 | 5 |

3 | 0 | 3 | 6 | 2 | 5 | 1 | 4 |

4 | 0 | 4 | 1 | 5 | 2 | 6 | 3 |

5 | 0 | 5 | 3 | 1 | 6 | 4 | 2 |

6 | 0 | 6 | 5 | 4 | 3 | 2 | 1 |

Is 147 divisible by 7?

147 gives 1+5·4+4·7=49

49 gives 5·4+4·9=56.

56 gives 5·5+4·6=49

49 gives 5·4+4·9=56

Whilst our new rule works, it seems to circle after slowly reducing the number.

We can rewrite it immediately as:

a-(-5)b+4c=0 mod 7

And note that -5 mod 7=2. So

a-2b+4c=0 mod 7

Trying our new new rule with 147:

147 gives 1-(2·4)+4·7=21

21 gives -(2·2)+4·1=0

So the rule is :

Add the units digit to the rest of the number, and if this is divisible by 3, then so is the number.

Example:

711 gives 1·1+71=72.

72 gives 2·1+7=9, which is divisible by 3, so 711 is divisible by 3.

So the subtraction rule for 3 is

Subtract twice the units digit from the rest of the number.

Example:

711 gives 71-2·1=69.

69 gives 6-2·9=12.

12 gives 1-2·2=-3, which is divisible by 3.

In this case, these set of rules are more difficult than the Method 1 rule, so we would use that rule.

Our rule is:

Add 5 times the units figure to the rest of the number, and if the result is divisible by 5, then so is the number.

For instance:

861 gives 86+5·1=91.

91 gives 9+5·1-14.

14 gives 1+5·4=21.

21 gives 2+5·1=7, which is divisible by 7.

Our rule is:

Subtract twice the units figure to the rest of the number, and if this is divisible by 7, then so is the number.

For instance:

861 gives 86-2·1=84.

84 gives 8+2·8=24.

24 gives 2-2·4=7, which is divisible by 7.

Number | Plus Factor | Minus Factor |
---|---|---|

13 | 4 | 9 |

Example

1092 gives 109+4·2=117.

117 gives 11+4·7=39

39 gives 3+4·9=39

So we cannot go further than 39, which is divisible by 13, so 1092 is divisible by 13.

1092 gives 109-9·2=91.

91 gives 9-9·1=0, which is divisible by 13, so 1092 is divisible by 13

Other rules can be discovered using Table of Rules for Testing Divisibility 2

Ken Ward's Mathematics Pages

No script follows:

Ken's book is packed with examples and explanations that enable you to discover more than 150 techniques to speed up your arithmetic and increase your understanding of numbers. Paperback and Kindle: