Saturday, June 02, 2018

The Divisibility Rule for Numbers ending in 5

Niranjan Ramakrishnan
June 2, 2018

A previous post, Divisibility - A more general approach, provided rules for checking divisibility of a number by any odd number not ending in 5. This post addresses that gap.

In that post I had stated that after trying briefly to discern a pattern for divisors ending with 5, I'd given up when no obvious pattern suggested itself. Well. This morning I gave it some more thought, and was thrilled to f ind a simple, consistent - and in the end almost tautological - pattern for
divisors ending with 5.

The divisibility rule for 5 itself is almost trivial - it divides any number ending with either 5 or 0. The only problem is, this doesn't tell us anything about checking for divisibility by 15, 25, 35, 45, etc.

To consider the problem I first set down the odd multiples of 15, 25, 35, etc., getting:

15: 15, 45, 75, 105, 135,...
25: 25, 75, 125, 175, 225,...
35: 35, 105, 175, 245, 315,...

If we omit the 5 at the end of each number a pattern begins to emerge.

15: 1, 4, 7, 10, 13,...
25: 2, 7, 12, 17, 22,...
35: 3, 10, 17, 24, 31,...

True, it's an arithmetic progression just as was the previous set of series  (hardly a surprise in a multiplication table). But the second batch of number sequences with smaller items is easier to
 comprehend and mine for a pattern.

For a start we see that for 15 the difference between the terms is 3, for 25, 5 and for 35, 7.

Thus, the difference between successive terms in each case is our divisor (recall that we are only dealing with divisors ending in 5) divided by 5.

We are now ready to formulate the rules, but first some definitions.

We shall use the vertical bar, |, to signify divisibility. That is, a|b means a is divisible by b.

Let's call the divisor (10x +5) . Therefore the divisor can also be considered as 5*n (thus, n is 3 for divisor 15, 5 for divisor 25, 7 for divisor 35, etc.).

The dividend in this case is of the form (10r+u), where u can only be 5 or 0.

The formula is simple.
For u=5,
(10r+u) | (10x + 5 )  if (r-x) | n

If u=0,
(10r+u) |  (10x+5) if r|n.


Let's look at some examples, one for u=5 and one for u=0.

Is  7645  |  55?
Here, r=764, u=5, x=5, n=11.
Since u=5, is (r-x) | n?
Is (764-5) | 11?
759 | 11, so 7645 |  55.
Divisible!

Is 15290 |   695?
Here, r=1529, u=0, x =69, n=139.
Since u=0, is 1529 |  139?
It is. So 15290 |  695.
Divisible!