Ready for a little math game? Take a pair of numbers whose digits are reversed. For example, 26 and 62, 123 and 321, 1002 and 2001, and so on. These are called reversible pairs. I’ve been thinking about these things because my dad and I are about to turn 48 and 84, respectively (our birthdays are two days apart), making our ages one such reversible pair. This doesn’t happen every year, but it’s not the first time this has happened either. Our ages also had this symmetry when I was 15, 26, and 37. You can count age 4 too (04 vs 40). It’ll happen again when I’m 59.
So what’s the pattern here? Look at a few random reversible pairs under 100, compare their difference, and see if you notice anything:
73-37 = 36
91-19 = 72
21-12 = 9
83-38 = 45
They’re always multiples of nine. It’s easy to prove this.
Any number can be decomposed into an arithmetic sum of base powers, say 10. For example:
47 = 4*10 + 7
74 = 7*10 + 4
Consequently a reversible pair <100 can be expressed as:
A*10 + B
B*10 + A
where A and B < 10
computing their difference gives:
(A-B)*10 – (B-A)
9A + 9B, which is just 9*(A+B).
Since A and B are integers, so is the sum. Thus, the difference is necessarily a multiple of nine. QED
So as it pertains to birthdays, a parent and child will only have “reversible pair ages” if the parent is some multiple of nine times older than their child (18, 27, 36,…). And at that, only once every eleven years (not proved here, but true nonetheless). My dad was 36 when I was born, thus the effect.
Now how about larger pairs, numbers over 100?
321-123 = 198
942-249 = 693
751-157 = 594
Probably less obvious, but there is a pattern here too. Any luck seeing it?
They are all multiples of 99.
It’s tempting to conclude that all 4 digit pairs differences will be multiples of 999 and more generally, that the difference of any N-digit digital reversible pair will be a multiple of (10^(N-1))-1. Alas, the conclusion is not correct. The reality proves far less interesting.
This is a bit gross, so if you’re still reading, stay with me! The decomposition of any number of the order 10^N is:
A(N)*10^N + A(N-1)*10^(N-1) + … A(0)*10^0
Its reversible pair is:
A(0)*10^N + A(1)*10^(N-1) + … A(N)*10^0
Doing the math on the difference you end up with the following linear system:
[A(N) -A(0)] * (10^N-1)
+ [A(N-1)-A(1)] * (10^(N-1) – 10)
+ [A(N-k)-A(k)] * [10^(N-k) – 10^(N-k-1)]
where k is the absolute value rounded down of 1/2*N. This is because symmetric terms combine (proof not shown here). So if N=5, k=2; if N=6, k=3.
[A(2)-A(1)]*99, or multiples of 99.
But for anything greater, the result is a multi-term linear equation. Here’s the result for N=5:
A*99999 + B*9990 + C*900
The upshot: this stuff is only fun for the living, for ages < 100.