Digit Math Application: Proving that all numbers ending with 5 are divisible by 5


Please read Digit Math: Introduction before you continue.

The problem

It seems I have developed a fascination for the number 5, so here we go again. Here I would be using Digit Math to prove that all integers  which end with digit 5 are always divisible by 5.

The proof

Case 1:

Take a two digit number xω5, i.e. x has only one digit.

xω5 is divisible by 5, if xω5×15 (i.e. xω5×0.2) leave no remainder.

So, xω5×2 must end with one zero.

xω5×0ω2=0ω2xω10=(2x+1)ω0

Since (1) ends with zero so it is proved.

Case 2:

xω5 is a number where x has n digits.

Multiplying xω5 by 10(n1) to make both sides of ω equal in number of digits.

So,

xω(5×10n1)×0ω(2×10n1)=0ω(2x×10n1)ω(10×10n1)=(2x×10n1)ω10n=(2x×10n1+1)ω]0[n

In the above equation it is easy to see that the result ends with 10 after we divide the 10n1. Therefore, this is not going to leave any remainder. (Proved)

Case 3:

55=1. (Proved)

Yeah, this is a trivial case, but for the sake of completeness.

Check out other applications of Digit Math

Link to list of other applications of Digit Math.

Digit Math Application: Proving the correctness of shortcut method to squaring numbers ending with 5


Please read Digit Math: Introduction before you continue.

The problem

Someday, somewhere I came to know that any number which ends with the digit 5 can be easily squared. The trick can be easily demonstrate using an example. Suppose we want to find the square of 25.

Trick is to take the number before 5 (which will be 2 here), add one to it (2 + 1 = 3) and then multiply them together (2 x 3 = 6). Now the final answer would be the product followed by the number 25, i.e. 625 in this case.

Now let’s try it out yo find 2152.

2152=(21×(21+1))ω25=(21×22)ω25=462ω25=46225

This always seemed to work out very well. The problem was, can I trust this trick? Will this always hold true? I didn’t have answers to those questions, until I proved it myself using Digit Math. Good news is that this trick will always hold true.

The proof

Let the number be x=aω5.  a can have any number of digits.

Case 1:

a has exactly one digit. So, ]a[=]5[=1.

(aω5)2=aaω(5a+5a)ω5.5=a2ω10aω2_5=a2ω(aω0)ω2_5=a2ω(aω2)ω5=(a2+a)ω2ω5=(a(a+1))ω25

Case 2:

a has more than one digits. So, ]a[>(]5[=1).

But to apply Bimultiplication formula a must have the same number of digits in 5, which is obviously not the case here. So, we will use one trick. We will pad 5 with some number of zeroes on the right, so that, ]a[=]5ωc[, where, c is all zeroes and ]c[=]a[1. So, if a=123c=00.

(aω5)2=(aω]5ωc[]a[)2=a2ω(a(5ωc)+a(5ωc))ω(5ωc)2=a2ω2a(5ωc)ω(5ωc)2=a2ω(10aω2ac)ω(5ωc)2=a2ω(10aωc)ω(5ωc)2=a2ω(aω0ωc)ω(5ωc)2=a2ω(aω0ωc)ω(25ω10cωc2)=a2ω(aω0ωc)ω(25ωcωc)

Since each digit group must have ]a[ digits, so let us move one zero from the middle c in 25ωcωc to the rightmost c. So, now that group becomes 25ωdωe, where ]d[=]c[1 and ]e[=]c[+1.

(1)=a2ω((aω0ωc)+(25ωd))ωe=a2ω(aω(0+25)ω(c+d))ωe=a2ω(aω25ωd)ωe

Now,

]25ωd[=]25[+]d[=2+(]c[1)=2+((]a[1)1)=]a[

So, in the group aω25ωd, a is excess.

(2)=(a2+a)ω(25ωd)ωe=a(a+1)ω25ωdωe=a(a+1)ω25ωcωc

So finally,

(aω5ωc)2=a(a+1)ω25ωcωc((aω5)×10c)2=(a(a+1)ω25ωc)×10c(aω5)2×102c=(a(a+1)ω25)×102c(aω5)2=a(a+1)ω25

So, we see that this trick is applicable for all kinds of whole numbers that end with 5. 

Check out other applications of Digit Math

Link to list of other applications of Digit Math.

Digit Math Application: Proving that multiplying with 10**n puts n zeros at the end


Please read Digit Math: Introduction before you continue.

The problem

This is a very fundamental concept that we were taught when we were in junior schools. Now, think of it, what it says. If you add x ten times then you will get xω0. If you add x hundred times then you will get xω00; and so on. How do we know that this will always be true? We know it since we have never seen one violation of it, but, anyway I will try to prove it know to rest the uneasy souls.

The proof

Before I continue with this proof, I must make sure we understand another empirical rule.

When any number is multiplied by zero then the result is always zero. This is not hard to see why. When you multiply x by 2 then it is like adding x twice. When you multiply x by 1 then it is like adding x once. When you multiply x by 0 then it is like adding x zero times, which in other words is that we never added x in the first place so x never existed, so we had nothing, and that nothing is zero.

Back to proof.

Let the number aωb be multiplied by 1ωd, where d is all all zeroes, n times. To use Bimultiplication forumula we need to make sure that b too has n digits. We can always partition a number such that b will always have n digits. For example if d=000 and aωb=2 then we make a=000 and b=002.

So,

aωb×10d=aωb×1ωd=a.1ω(a.d+b.1)ωb.d=aω(d+b)ωd=aωbωd

So, in the above equations we see that multiplying a number by 10d will give us the same number, but followed with d zeroes. (Proved)

Check out other applications of Digit Math

Link to list of other applications of Digit Math.

Bertrand Russell (Famous Mathematician and Logician)

Digit Math: Introduction

The person in the above image is Bertrand Russell. Famous Mathematician and Logician.  An excellent graphic novel, Logicomix, is based around his life. That is a must read.

First thing first. Even if you are not a Math demi-god, it is fine, Digit Math is still for you. In fact my academic track record shows that I barely survived Mathematics! I invented this thing when I was in standard eleventh while trying to create some shortcut formula, because I kept forgetting long formulae and was very slow in arithmetic. Digit Math is a slightly different approach to classical Math. To understand this all you need to know is how to add and multiply, and a little bit of logic. That is it.

What is Digit Math?

Numbers are group of digits. Classical Mathematical operators are not meant to deal with few digits of a number. Digit Math allows that. You can interact with a single digit or a group of digits in a number. You might wonder, what is the use? Well, I would say, for fun. Like any good puzzle, this too forces you to think differently. It is not all pointless fun though.

Can you prove that any number which ends with 5 must be divisible by 5? Well try that using classical Math. I have used Digit Math to prove the same. There some more empirical facts which I have proved using Digit Math. One of that is proving that multiplying any number by 10n will indeed give us that number but followed by n zeroes. This might look obvious to you, but think for a moment, why does adding a number like 6, 100 times is guaranteed to yield the exact number 600.

Before we begin…

Before we begin I must list out the notations and symbols I would be using. They were introduced specifically for this, since I don’t know of any existing symbols which convey the same information.

Symbols and Operators

I would be using these symbols throughout the articles on Digit Math, so pay attention to them.

ω (With-operator)

This is the main operator, which delimits the digits or groups of digits. I call this the ‘with-operator’. So, 251 can be written as 2ω51 (spoken as two-with-fifty-one) or 25ω1 (spoken as twenty-five-with-one) or 2ω5ω1 (spoken as two-with-five-with-one) or even 0ω251. They all are the same, only the digit partitioning is different. How you partition depends on the problem at hand.

]x[ (Digit Group operator)

This is used in multiple ways. Its primary use is to group digits into a digits group. While in 2ω51 it is quite clear that 2 and 51 are different digit groups of one and two digits respectively, but sometimes we need to convey more information about a digit group.

  • ]x[ – This is equal to the number of digits in x, when used on its own. So, ]25[=2.
  • ]x[y – This means that x should have y digits. Note that I said ‘should’ have. So, it is possible that while solving the problem, at intermediate steps we can have less or more digits. Eventually, the final result must have exactly y digits. This kind of notation is usually used when actual value of x is not known and x is part of a bigger number. So, 2ω]x[2 means that this is a number which starts with 2 but ends with two digits.
  • Underline notation – Take the example of 2ω]345[2. Here 3 is the extra digit in this digit group which has the maximum capacity of two digits. In this case since all the digits are known, so here we can use a short-hand notation of underlining the excess digit in the group. So, 2ω]345[2=2ω3_45. (Note that 3 is underlined.)

ω (Digits summation operator)

So,ω3i=1ai=a3ωa2ωa1

Note that a1 is the rightmost digit and a3 the leftmost. Maintaining the sequence in digitized equations are of massive importance.

Precedence of With-operator

ω has lower precedence than multiply and division. So the full operator precedence would be:

B – Bracket
O – Orders (powers, roots, etc.)
M – Multiply
D – Divide
W – With (ω)
A – Add
S – Subtract

Properties of With-operator

  • This is not commutative. This is because, 2ω5=2552=5ω2.
  • This is associative, but only when none of the digit groups have excess digits. That is, less number of digits than required is tolerated. So, aω(bωc)=(aωb)ωc.
  • This is distributive, but only when all digit groups have the exact number of digits. So, less digits is not tolerated here. So, n×(aωb)=(na)ω(nb).

Some Important Formulae

General formula of transformation

This provides the relation between a normal equation and a digitized equation.

So,ωni=1ai=ni=1ai×10ni

Provided ai has one digit only (i.e. ]ai[=1). This is not hard to see, how the above is true.

Bi-multiplication formula

This formula is vital. This describes how the groups of digits behave when they are multiplied. This starts with how we usually manually multiply two numbers.

xωy×aωb_bxωbyaxωay¯axω(ay+bx)ωby

So,

xωy×aωb=axω(ay+bx)ωby_

The above relation is pretty easy to understand, but it does say how many digits should be in each group (digits separated by ω). To understand this, try multiplying 12 by 34, the manual way. This would be like

1ω2×3ω4_4ω83ω6¯3ω(6+4)ω83ω10ω84ω0ω8408

Now lets try multiplying 111 by 123.

01ω11×01ω23_23ω2531ω11¯1ω(11+23)ω2531ω(11+23+2)ω531ω36ω5313653

So you can observe from the above scenarios that:-

]a×b[=nwhere ]a[ = ]b[ = n

Similarly,

]a+b[=nwhere ]a[ = ]b[ = n

Any excess digits should be carried over to the digit group on the left and added there.

So,

1+9_0ω1_0(0+1)ω01ω010

If  ]a[]b[ then I am not sure what should be ]a×b[. So, we need to make sure that all digit groups have equal number of digits. This is restrictive but fortunately this does not cause problem as there is always a way around.

One more example. Let’s multiply 98 by 76.

9ω8×7ω6_54ω4863ω56¯63ω(56+54)ω4863ω110ω4863ω(110+4)ω863ω114ω8(63+11)ω4ω874ω4ω87448

Rules for using the bi-multiplication formula

You have already witness many of the rules, but let me summarize them for clearly. For the following assume that we are multiplying aωb by xωy.

  • Make two fragments of both the numbers, by placing ω at the positions suitable for you. Remember, the number of digits in all the four fragments should be equal. That is, ]a[=]b[=]x[=]y[.Partitioning 255 as 2ω55 is perfectly fine, since ]02[=]55[=2.
  • If the number of digits in by or ay+bx terms are less than the required number then insert zeroes in front of them to get the exact number of digits.
  • If the number of digits in by or ay+bx terms are more than the required number then remove the excess digits from the front (left) of them and add these excess digits to the group on left. Note, that shifting of excess digits (carry over) should started from the rightmost group and then progress towards left sequentially.
  • When all the above conditions are met then you are good to remove the ω (with-operator).

So, finally the bi-multiplication formula can be precisely expressed as,

xωy×aωb=axω]ax+by[nω]by[nwhere ]a[ = ]b[ = ]x[ = ]y[ = n

Squaring formula

This is directly derivable from bi-multiplication formula.

(aωb)2aωb×aωba2ω]2ab[nω]b2[nwhere ]a[ = ]b[ = n

General Powering Formula

For now I will provide only the formula. The proof is provided later in this article. The way I derived it was to I manually find the values of (aωb)2(aωb)3(aωb)4 and so on. I found a pattern in all these and from there I got this formula. It was later when it struck me as to how to prove it.

(aωb)n=ωnr=0]nCr×a(nr)×br[dwhere ]a[ = ]b[ = d

Notice that the above equation looks very similar to Binomial equation. In fact I found this to be true for many equations. If we replace + by ω then we end up with a ‘digitized’ version of that equation.

Now let me demonstrate how to use this equation. Let’s find cube of 99, i.e. 993.

(9ω9)3=]3C0×93×90[1ω]3C1×92×91[1=93ω3×93ω3×93ω93=729ω218_7ω218_7ω72_9=729ω218_7ω225_9ω9=729ω241_2ω9ω9=970ω2ω9ω9=970299

I didn’t underline the excess digits in leftmost group, since that is anyway not going to affect the result. Now let us find 2414.

(02ω41)4=ω4r=0]4Cr×2(4r)×41r[2=4C0.24ω4C1.23.41ω4C2.22.412ω4C3.2.413ω4C4.414=16ω13_12ω403_44ω5513_68ω28257_61=16ω13_12ω403_44ω5796_25ω61=16ω13_12ω461_40ω25ω61=16ω17_73ω40ω25ω61=33ω73ω40ω25ω61=3373402561

Note, one important observation. Here you can immediately identify the last couple of digits of the final result by evaluating for the last term. Unlike in Binomial Theorem, where all the terms need to be added. So, there at least last few digits of all the terms need to be added to get the  last few digits of the final result. This is an advantage for General Powering formula, but unfortunately we cannot say the for other digit groups which are at higher place order. The reason is simple, they may have to be added with carry-overs from the groups (terms) on the right.

A corollary of the General Formula of Transformation (for two digits)

With to Plus form

aωb=10a+b

The above equation is true only when b has one digit. The more general equation is:-

aωb=a.10d+bwhere d=]b[Corollary 1

Plus to With form

aωb=10a+baωb=9a+a+ba+b=aωb9aCorollary 2

Negative digits

We all are aware of negative numbers but in digit equations we might end up with negative digits! I see no physical significance of that but let’s try to find out some mathematical meaning of this.

aω(b)=10a+(b)=10ab=10a+b2b=aωb2b

Altire,

aω(b)=(10a+b)=(10a+b20a)=(aωb20a)=(aωb)+20a

aω(b)=aωb2b=(aωb)+20a

Remember, (a)ωb(aωb). The former means that only the digit a is negative. The later means that the complete number is negative.

Similarly,

(a)ωb=aωb20a=(aωb)+2b

Also similarly evaluating, we get,

(a)ω(b)=(aωb)Corollary 3

So, we see that in a negative number all the digits too are negative. Not surprising, since in a positive number all digits are positive.

Proof of General Powering Formula

Since I already know this formula, so I just need to prove that it is correct. For this the best tool is Mathematical Induction. So, the formula to prove is

(aωb)n=ωnr=0]nCr×a(nr)×br[d

Case 1: n = 0

So,

L.H.S.=(aωb)0=1R.H.S.=ω0r=00Cr×a(0r)×br=1×a0×b0=1

Case 2: n = 1

L.H.S.=(aωb)1=aωbR.H.S.=ω1r=01Cr×a(1r)×br=1C0.a1.b0ω1C1.a0.b1=aωb

Case 3: For n

Suppose that the formula is true for all values of n, then by Mathematical Induction, the formula must be valid for n+1 too.

So,

(aωb)(n+1)=(aωb)n×(aωb)=(aωb)n×(a×10d+b)where d=]b[=10da×(aωb)n+b×(aωb)n=10da×(ωnr=0nCr×a(nr)×br)+b×(ωnr=0nCr×a(nr)×br)=10d×(a(n+1)ωωnr=1nCr×a(n+1r)×br)+(ω(n1)r=0nCr×a(nr)×b(r+1)ωb(n+1))

Since ]a[=]b[=d, so every term of ω too will have d digits, as per General Powering Formula. This implies that term b(n+1) in equation (1) too has d digits. So, if we can rewrite (1) as below:-

a(n+1)ωωnr=1nCr×a(n+1r)×br+ω(n1)r=0nCr×a(nr)×b(r+1)ωb(n+1)an+1ω¯ωnr=1{nCr×an+1r×br+nC(r1)×an(r1)×b(r1)+1}ωbn+1an+1ω(ωnr=1nCr×an+1r×br+nCr1×an+1r×br)ωbn+1

Notice that in the above, I have removed the 10d factor since all it did is to shift its term by d digits to left, that is, by exact number of digits in the b(n+1) group. After removing the first digit group from equation (2) and last digit group from equation (3), ω in both the equations have n1 digit groups left. Each of these digit groups will get added term by term, i.e. group 1 of (2) will get added to group 0 of (3) and so on. So this implies r=r1.

Further simplifying,

(4)=an+1ω(ωnr=1an+1r.br(n!r!(nr)!+n!(r1)!(nr+1)!))ωbn+1=an+1ω(ωnr=1an+1r.br.(n+1)!r!(n+1r)!.(n+r1n+1+rn+1))ωbn+1=an+1ω(ωnr=1an+1r.br.n+1Cr.(1))ωbn+1=(Cn+10.an+10.b0)ω(ωnr=1Cn+1r.an+1r.br)ω(Cn+1n+1.a(n+1(n+1)).bn+1)=ω(n+1)r=0(n+1)Cr.a(n+1)r.br

So, proved that (aωb)(n+1)=ω(n+1)r=0(n+1)Cr.a(n+1)r.br when (aωb)n=ωnr=0nCr.anr.br.

So, all cases proved.

Application of Digit Math

Now time to see Digit Math in action. I will be using this to prove some empirical concepts.

Link to list of applications of Digit Math.