Header tag

Monday, 17 February 2025

Calculator Games: Reverse Digits and Subtract

REVERSING DIGITS: IS THERE A PATTERN?

This one comes from CoPilot, but is again in the style of Calculator Fun and Games, and is treated slightly differently, as "One Thousand and Eighty Nine" in the book.


Copilot:
Pick a number and try to form a specific pattern using the digits, for example, “Change 123 to 321 using only addition and subtraction.”

Book:
Take a three digit number, and reverse the digits.  Subtract the smaller from the larger.  Then, take the result of this subtraction, and add it to its digits reversed; you will always get 1089.

The Copilot idea is not a perfect suggestion for a game (why subtract when you could just add a smaller number?) but it has potential for an investigation.

Let’s take the example as written:  change 123 into 321.

321-123 = 198

This means that we can change 123 into 321 just by adding 198.  And 1
98, for those who’ve been reading my series on calculator fun and games, immediately stands out as a multiple of 9.  The digits sum to 18, which is a multiple of 9 (and its digits sum to 9 as well).


Let’s try another number and see if this is a fluke:  Let’s try 456 and 654.
654-456 = 198

And another, with non-consecutive digits:

781 – 187 = 594, also a multiple of 9 (5 + 9 +4 =18)

In fact, let’s try a whole range of random numbers, with reversed digits, making sure to subtract the smaller of the pair from the larger.

872 – 278 = 594 (reversed = 495, and 495 + 594 = 1089)
512 – 215 = 297 (reversed = 792, and 792 + 297 = 1089)
503 – 305 = 198 
(reversed = 198, and 198 + 891 = 1089)
902 – 209 = 693 (reversed = 396, and 396 + 693 = 1089)

There's a full solution to the 1089 phenomenon online (there are many; and here's another that's simpler to follow but less detailed); I won't add anything further to it here.

And four-digit numbers:
8112 – 2118 = 5994 
7205 – 5027 = 2178
(if you reverse and sum these results, you get 10989 and 10890; there isn't a unique answer).

And five-digit numbers:
98765 – 56789 = 41976  (41976 / 9 = 4664, in case you were wondering, as I was)
85127 – 72158 = 12969  (also divisible by nine; 12969 / 9  = 1441)

Why is this?

Well, let's 
take a four-digit number abcd, where abc,and are its digits. The value of the number can be expressed as:

When you reverse the digits, the number becomes dcba, which can be expressed as:

Now, when we subtract the smaller number from the larger, we get:

This can be factorised as:

And since the result is a multiple of 9, it shows why the result of the subtraction is always a multiple of nine (for four-digit numbers).  The same logic can be applied to three-digit numbers (where it's easier), or to numbers with more digits too. 

In the case of three digits, the result will be simpler.  For a number abc and its reverse, cba, the b will cancel and the result is always be 9 * (11(a-c)) or 99(a-c).


And it stands as a useful little trick to show on a calculator!

Previous Calculator Fun and Games articles:
Snakes and Ladders (Collatz Conjecture)
Crafty Calculator Calculations (numerical anagrams, five digits)
More Multiplications (numerical anagrams, four digits)
Over and Out (reduce large numbers to zero in as few steps as possible)

No comments:

Post a Comment