## Divisibility Formula for Numbers Ending in 5  - Proof

Niranjan Ramakrishnan
July 9, 2018

The previous post gave an empirical formula to determine if a number was divisible by a divisor ending in 5. This post offers a proof for the same.

Proposition:
Any number (10r+u) | (10x+5), if (r-x) | n for u=5, or r | n for u=0, where n=(10x+5)/5.

Proof:
If n=(10x+5)/5, n= (2x+1).

Since we're only considering dividends ending in 0 or 5, it is sufficient to show that ((10r+u) / 5) | n.

When u=5, (10r+u) /5 = (2r + 1).
(2r+1) can be rewritten as (2r -2x +2x + 1).
Thus if (r-x) |  n, then (2r + 1) | n, because n=2x+1.
QED.

When u=0, (10r+u) / 5 = 2r.
If r | n, then 2r | n.
QED.

## 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!

## Tuesday, May 15, 2018

### Divisibility by Numbers ending in 1, 3, 7, and 9 - Proofs of the Formulas

Niranjan Ramakrishnan
May 15, 2018

The previous post provided a set of four empirical formulas to ascertain if a number is divisible by a divisor ending in 1, 3, 7 or 9. This post provides a proof for each of the formulas. Many grateful thanks to Dr Ranjan Roy, who was kind enough to indicate how the proof might be evolved, most importantly the difference of 1 from a multiple of 10.

Notation: The vertical bar, '|' is used here to signify divisibility. E.g., x|y means x is divisible by y.

Let's start by setting down a few identities.
:
10 (x)-1(10x+1) = -1             [1]
10(3x+1)-3(10x+3) = 1         [2]
10(3x+2)-3(10x+7) = -1      [3]
10(x+1)-1(10x+9) = 1           [4]

Without losing generality, we can represent the numbers as (10r+ u), (10x + 1), (10x + 3), (10x +7), (10x + 9), etc.

For divisors ending in 1
Proposition:
If (r-m*u)|(10x+1), then (10r+u)|(10x+1).
where m=x.
Proof:
If (r-m*u) | (10x + 1) then 10(r-m*u) | (10x + 1).
i.e., (10r - 10m*u)| (10x + 1), or, (10r-10x*u)| (10x + 1).
i.e., (10r-(10x+1-1)*u)| (10x + 1).
i.e., ((10r+u) - (10x + 1) * u) | (10x + 1).
Since (10x + 1) * u is divisible by (10x + 1), it follows that (10r+u) ,| (10x + 1).
QED

For divisors ending in 3
Proposition:
If (r+m*u)  | (10x + 3) then (10r+u) | (10x + 3)
where m=(3x + 1).
Proof:
If (r+m*u)  | (10x + 3) then (10r+10m*u) | (10x + 3).
Substitution for m gives
(10r +  10(3x + 1) *u)| (10x + 3).
But as shown above,,
10(3x + 1) =  3(10x + 3) +  1.
(10r + (3(10x + 3) + 1)*u) | (10x + 3).
i.e., ((10r+u) +3(10x + 3) * u)) | (10x + 3).
Since 3(10x + 3)*u ) | (10x + 3), it follows that
(10r + u ) | (10x + 3).
QED.

For divisors ending in 7
Proposition:
If (r-m*u) | (10x +7), then (10r + u) | (10x +7), where m =(3x + 2 ).
Proof:
If (r-m*u) | (10x +7), then (10r - 10m*u) | (10x +7).
Substitution for m gives
(10r - 10(3x + 2) *m) | (10x +7).
But as noted above,
10(3x + 2)  = 3(10x +7) - 1.
Making this substitution yields
(10r - (3(10x +7) - 1) *u) | (10x +7).
Rearranging terms,
((10r+u) - (3(10x +7)*u)) | (10x +7).
Since the second term (3(10x +7) * u) | (10x +7),
(10r+u) | (10x +7).
QED.

For divisors ending in 9
Proposition:
If (r+m*u)  | (10x + 9) then (10r+u) | (10x + 9) where m=x+1.
Proof:
If (r+m*u) | (10x + 9), then 10(r+m*u) | (10x + 9).
i.e., (10r +10m*u) | (10x + 9).
Substitution for m gives
(10r + 10(x+1)*u) | (10x + 9).
But, as noted above,
10(x + 1) = (10x + 9) +  1.
Substitution yields
(10r + ((10x + 9) + 1 ) * u) | (10x + 9).
Rearranging terms,
((10r + u ) + (10x + 9)) | (10x + 9).
The second term, is obviously divisible by (10x + 9).
Therefore, so must be the first team.
(10r + u) | (10x + 9).
QED .

## Thursday, May 10, 2018

Divisibility - A more general approach
Niranjan Ramakrishnan
May 8, 2018

Everyone is taught some basic rules for checking if a number is divisible by 2, 3, 4, 5, etc . Any even number is divisible by 2. For 3, if the sum of its digits is divisible by 3, so is the number itself. If the number formed by its last two digits can be divided clean by 4, the number is divisible by 4. Any number ending in either a zero or a 5 is divisible by 5. Any An even number divisible by 3 is divisible by 6. The rule for 8 is similar to that for 4, except that the number tested is that formed by the last three digits - not the last two. The rule for 9 is identical to that for 3 - if the sum of the digits is divisible by 9, so is the number. The test for 10 is trivial - any number ending in a 0. One other rule is taught: if total of the odd positioned and even-positioned digits is either equal or differs by a multiple of 11, the number is divisible by 11.

If still awake a reader might notice that the rules summary is missing any mention of 7. This is because in teaching rules of divisibility the number 7 stood in some bad odor, unamenable to  ready rulemaking. We used to declare, as our elders nodded mournfully, that there was no rule for 7.

But there does exist a divisibility rule for 7, as I learned from the Internet some years ago. Yesterday I stumbled on the fact that the rule for 7 contains an approach that blows open a path to check divisibility more general than the techniques we were taught.

Let's start with the divisibility formula for 7. First some definitions. Three concepts are involved. The number being tested is broken into two parts - the last digit, the number in the units or 1's place, which we shall call 'u', and the rest of the original number, which we shall call, 'r'. That's two of the three concepts.

E.g., if our number is 266, u=6 and r=26.
The algorithm for7 is as follows: if r-2*u is divisible by 7, then so is the original number.
Applying this to 266, r-2*u = 26-2*6 = 26-12 = 14
Since 14 is divisible by 7, so is 266 (7 times 38).
Note that a subtraction result of 0 also means the number is divisible, as zero is divisible by 7 (or by any Natural number).
E.g., 84. r=8, u=4. r-2*u gives 0.

The third concept is the multiplier 'm', 2 in this algorithm for 7. How exactly 'm' is to be calculated will be discussed shortly.

I rested content in this knowledge until yesterday, when a sudden email arrived from my sister, comprising a single line, "What is the formula for divisibility by 17?"

I didn't know, of course. Wondering if there wasn't something for 17 along the lines of the formula for 7, I  began to explore in my mind various combinations and to my surprise chanced upon one which seemed to work. All that was required was to use 5 as the multiplier in place of 2. Thus for 17 itself, r=1, u=7,m=5, and r-m*u = -34. For 102, 10-5*2= 0!

This success emboldened me look at 27, and I found that a multiplier of 8 worked beautifully. It seemed to be a series - 2(7), 5(17) 8(27), 11(37), 14(47), etc. in short, m=3x+2, where x is 0 for 7, 1 for 17, 2 for 27, 3 for 37,...25 for 257, etc.

Next I tackled 13, the next prime number without a divisibility formula (that I knew of). Turned out to have one, but of the form r + m * u, i.e., a plus instead of a minus. For 13, m=4. For 23 m= 7, etc. the general expression being m=3x+1, where x is 0 for 3, 1 for 13, 2 for 23, ...25 for 253, etc.

Then for numbers ending in 9, the formula is m=x+1, where x is again 0 for 9, 1 for 19,... 25 for 259, etc.  We have to check r+m*u,  just like for numbers ending in 3.

Finally,  numbers that end in 1. Here, m=x,  where x is 0 for 1, 1 for 11, 2 for 21, 3 for 31,... 25 for 251, etc.  The number to test is r-m*u.

Deciding to press my luck I ventured into numbers ending in 5. No obvious pattern suggested itself.

But there is an alternating pattern to the four number-endings,.  1 (r-m*u),  3 (r+m*u),  7 (r-m*u)  and 9 (r+m*u).

I'm sure students of mathematics are familiar with these formulas,  but I certainly hadn't encountered rules for 7, 13, 19, etc.  during my several years of science and mathematics in school and college,  which is why the utter simplicity - and generality -  brought so much delight when I uncovered them.

One example each of divisors ending in 1, 3, 7 and 9.

Is 372 divisible by 31?
Formula: r-m*u and m=x.
Here,  r=37, u=2, m(=x)=3.
r-m*u = 37-2*3 = 37-6  = 31. Divisible!

Is 559 divisible by 43?
Formula: r+m*u,  where m=3x+1.
Here,  r=55,  u=9, m(3x+1)=13.
r+m*u = 55+13*9 = 55+117 = 172. 172 = 4 * 43. Divisible!

Is 1164 divisible by 97?
Formula: r-m*u,  where m=3x+2.
Here,  r=116, u=4,m(3x+2)=29.
r-m*u = 116-29*4 = 116-116 = 0. Divisible!

Is 1157 divisible by 89?
Formula: r+m*u,  where m=x+1.
Here, r=115, u=7, m(x+1)=9.
r+m*u = 115+9*7 = 115+63 = 178. 178 is 2 times 89. Divisible!

## Wednesday, September 28, 2011

### The Key to Sussex?

Two royals seeing eye to eye

by Niranjan Ramakrishnan

Shortly after news  of Pataudi's death, a friend of mine sent me the following one-line email:

Who was the other cricketer with one eye?........Ranjitsinhji.

 Pataudi
I thought this didn't make any sense. I had read somewhere long ago how Ranji's cousin Duleepsinhji, on first going to England, was told by some doctor that he had a problem with his eyesight.  His house master dismissed any such notion saying that no relative of Ranji could possibly have anything wrong with his eyes.  Besides, I reasoned, it's one of those things you expect would be common knowledge if true.

 Ranjit Singh
Then it occurred to me my friend might be joking.  He was talking, no doubt, about Maharaja Ranjit Singh, who did indeed have only one eye!  One of the Yehudi-Menuhin-is-a-violinist. Mahatma-Gandhi-is-a...non-violinist  variety, it seemed.

After dashing off a clever note to my friend saying I wasn't aware that Maharaja Ranjit Singh played cricket, something impelled me to read up on Ranji just to be sure. On Wikipedia at first glance, there was lots about his time in England, his cricket of course, and his disputes over the title to his principality of Nawanagar.  There was no prominent mention of any business of making do with one eye, etc.

As I read through the Wikipedia page, though, I found the following passage deep in its bowels:

 Ranji
"When the First World War began in August 1914, Ranjitsinhji declared that the resources of his state were available to Britain, including a house that he owned at Staines which was converted into a hospital. In November 1914, he left to serve at the Western Front, leaving Berthon as administrator.[note 9][209]  Ranjitsinhji was made an honorary major in the British Army, but as any serving Indian princes were not allowed near the fighting by the British because of the risk involved, he did not see active service. Ranjitsinhji went to France but the cold weather badly affected his health and he returned to England several times.[210] On 31 August 1915, he took part in a grouse shooting party on the Yorkshire Moors near Langdale End. While on foot, he was accidentally shot in the right eye by another member of the party. After travelling to Leeds via the railway at Scarborough, a specialist removed the badly damaged eye on 2 August."

Don't ask me how an eye damaged on 31 August needed removing on 2 August. I'm merely quoting Wikipedia verbatim.

This was long after his prime cricketing years. He had played his last test match in 1908, and seems to have last played serious county cricket in 1912. He played for Sussex, even captaining it briefly (as did Pataudi).

For all that it is my friend who will have the last laugh. Wikipedia again:

"Ranjitsinhji's last first-class cricket came in 1920; having lost an eye in a hunting accident, he played only three matches and found he could not focus on the ball properly. Possibly prompted by embarrassment at his performance, he later claimed his sole motivation for returning was to write a book about batting with one eye; such a book was never published.[166]"

Was there any famous cricketer (other than Pataudi) from India who played with a visual handicap? Well, you can bet your right eye on it.

Niranjan Ramakrishnan is a writer living in the USA. He can be reached at njn_2003@yahoo.com.

## Monday, September 19, 2011

### Who controls your food supply?

The Food Bandits
"The number of hungry people has soared to nearly 1 billion, despite strong global harvests...Just four companies control at least three-quarters of international grain trade; and in the United States, by 2000, just ten corporations—with boards totaling only 138 people—had come to account for half of US food and beverage sales. Conditions for American farmworkers remain so horrific that seven Florida growers have been convicted of slavery involving more than 1,000 workers. Life expectancy of US farmworkers is forty-nine years."

Nation Magazine's upcoming Oct 3 issue carries an anchor piece by Francis Lappe Moore (author of Diet for a Small Planet), along with replies by well-known experts on the topic of food security: Raj Patel, Vandana Shiva, Eric Schlosser, and Michael Pollan.

That this is a vital issue of both individual liberty and national sovereignty is without question. That it is discussed so little is a reflection on our myopia.

Raj Patel in his piece Why hunger is still with us says,
"[W]e’re growing more crops than ever before not for direct human consumption, or even animal feed, but as biofuels, to keep cars on the road. Already, more than a tenth of the world’s total coarse grain output is used for fuel, and the OECD predicts that within a decade a third of all sugar cane grown on earth will be used not for sweetening but for combustion."
Eric Schlosser places the problem in larger context,
"The corporate monopolies and monopsonies, the contempt for labor unions, the capture of federal agencies, the corruption of elected officials, the lies routinely told to consumers, the disregard for the environment and for public health—none of these things are unique to the food industry. You will find them in the oil, chemical, media and financial industries, among many others. They have become commonplace in the US economy. They are signs of a much larger problem, of a society where a handful of corporations choose the lawmakers, dictate the laws, control production and distribution, widen the gulf between rich and poor."
And increasingly, one might add, none of these things are unique to the United States either. As Vandana Shiva says of the situation in India,
"But the biggest threat we face is the control of seed and food moving out of the hands of farmers and communities and into a few corporate hands. Monopoly control of cottonseed and the introduction of genetically engineered Bt cotton has already given rise to an epidemic of farmers’ suicides in India. A quarter-million farmers have taken their lives because of debt induced by the high costs of nonrenewable seed, which spins billions of dollars of royalty for firms like Monsanto."
Far more significant than who wins in 2012, don't you think?

## Tuesday, April 29, 2008

### From Market Snodsbury to Madison Square Garden?

Jeeves takes Charge Revenge
(with apologies to PG Wodehouse)

by Niranjan Ramakrishnan

The usual Jeeves story is as follows: Bertie gets in hot water, goes bleating to Jeeves, who brings to bear his infinite sagacity to rescue his master. While doing so, he also extracts a victory of sorts -- making Bertie give up something -- now a jacket, now a tie, another time his moustache! The story ends with a restored Bertie Wooster calling for a restorative brandy and soda, only to find the effects already at his elbow. Jeeves is perfect.

Unsuitable romantic dalliances are one thing, calling for no more than minor strictures as above, but a permanent change in the status-quo is a different matter altogether. In such instances, Jeeves can be ruthless, as when Wooster contemplates having his sister and her three daughters move in with him ("it will be nice to hear the pitter-patter of little feet about the place, Jeeves", or words to that effect). Jeeves realizes that immediate and salutary measures are called for. In an unforgettable episode (the only one written in Jeeves' hand rather than Wooster's), he puts Bertie before an audience of schoolgirls, from which Wooster emerges a chastened man, cured of his illusions about how charming the young ladies are.

Something similar occurred last month, when Sen. Bertie Wooster (D-IL) was asked about a ripe idea (assumed, naturally, to have emanated from Jeeves). Instead of paying tribute to the great man ("from the collar upward, he stands alone" would have been mot juste), he instead chose to take the tack of I was reluctantly compelled to hand the misguided blighter the mitten...

Addressing the girls school in Philadelphia shortly thereafter, he sought to exercise the full force of his own personality, freely throwing all and sundry under the bus as he did so -- from public figures to private individuals -- most notably his own grandmother -- no wonder he was described later by Jeeves as merely doing what politicians do. But in his defense, we must add that here Bertie was only following the ancient Wodehousian dictum, drilled into every Drones Club alum: stick to stout denial.

Jeeves, meanwhile, bided his time, making no comment. As the expression goes, he watched Bertie's future progress with considerable interest, shaking his head many times over the next few weeks, with an avuncular sadness, as he watched the young master's discomfiture -- whether it was letting his hair down in San Francisco CA, bowling in Altoona, PA, or blowing it in the debate a couple of days before the big primary. A lesser gentleman's gentleman would have said that nature had scored the equalizer, and proceeded to tear out those eleven pages from the book at the Junior Ganymede.

But as Bertie Wooster has said often, Jeeves stands alone (in this instance quite literally, and that was one huge grievance right there).

He waited his moment, and when he was ready, he burst forth...as Gussie Fink Nottle.

Now there are two unforgettable speeches in the Wodehouse canon. One, mentioned above, is Bertie Wooster addressing the Girls' School. The second is Gussie Fink Nottle's speech to the Market Snodsbury Grammar School. Fink Nottle, the shy and reclusive friend of Wooster's (and student of newts -- your joke here) is fully drunk (Wooster and Jeeves, unbeknownst to each other, have both spiked his drink, with the common objective of getting him over his fear of audiences) as he plows ahead with his speech, inebriation having vanquished inhibition:
[A snippet of Bertie Wooster's description of the speech]
"G. G. Simmons was an unpleasant perky-looking stripling, mostly front teeth and spectacles... Gussie, I was sorry to see, didn't like him. 'So you've won the Scripture-knowledge prize, have you?'

'Sir, yes, sir.'

'Yes,' said Gussie, 'you look just the sort of little tick who would. And yet,' he said, pausing and eyeing the child keenly, 'how are we to know that this has all been open and above board? Let me test you, G. G. Simmons. Who was What's-His-Name - the chap who begat Thingummy? Can you answer me that, Simmons?'

'Sir, no, sir.'

Gussie turned to the bearded bloke. 'Fishy,' he said. 'Very fishy. This boy appears to be totally lacking in Scripture knowledge.'"

[Bertie leaves around this point, embarrassed as Gussie spots him and discloses to the audience that Bertie Wooster, the pessimist, had said that if he spoke, his pants would split in the back. Later on, Jeeves fills him in...]

"...he proceeded to deliver a violent verbal attack upon the young gentleman, asserting that it was impossible for him to have won the Scripture-knowledge prize without systematic cheating on an impressive scale. He went so far as to suggest that Master Simmons was well known to the police.
'Golly, Jeeves!'

Yes, sir. The words did create a considerable sensation. The reaction of those present to this accusation I should describe as mixed. The young students appeared pleased and applauded vigorously, but Master Simmons's mother rose from her seat and addressed Mr Fink-Nottle in terms of strong protest.

'Did Gussie seem taken aback? Did he recede from his position?'

No, sir. He said he could see it all now; and hinted at a guilty liaison between Master Simmons's mother and the head master, accusing the latter of having cooked the marks, as his expression was, in order to gain favour with the former.

'You don't mean that?'

Yes, sir.

'Egad, Jeeves! And then -'

They sang the national anthem, sir."
Jeeves, in Gussie Fink Nottle's costume (Fink Nottle once was arrested dressed as Mephistopheles) is now embarked upon a veritable spree of Market Snodsburys, giving the original a run for its money. Starting with the NAACP convention, where he showed off his mimicry, sang, danced and conducted a mock orchestra, he went on to a packed house at the National Press Club in Washington DC.

As the show hits the road, Bertie squirms, helpless. But as he has himself often noted, pity the poor fish that would match its wits against Jeeves.

Copyright (c) Niranjan Ramakrishnan, 2008.