A while ago two friends and I sat down in a beer garden, got a piece of paper from the main bar and tried to figure out how this mathemagical little pattern works.
Take the main 3x3 grid of your calculator: 1 through 9 (0 isn't part of the equally spaced grid, so we have to leave it out for the trick). Choose any four numbers that form a parallelogram (opposite sides are parallel and equal in length), and traverse them in a cycle (clockwise or counterclockwise)
Heres some examples, try them out on your calculator:
Any of these 4 digit cycle sequences you can type out will ALWAYS be divisible by 11.
What's happening here?
Let's start to dig into this by figuring out the rule for divisibility by 11. If we have a 4 digit number with digits $a$, $b$, $c$, and $d$, we can write it as $$1000a + 100b + 10c + d$$
For example, 1782 has \(a = 1\), \(b = 7\), \(c = 8\), \(d = 2\).
Now we can rewrite this to see how each coefficient relates to the known closest multiple of 11:
- \(1000 = 1001-1 = 11(91) - 1\)
- \(100 = 99 + 1 = 11(9) + 1\)
- \(10 = 11 - 1 = 11(1) - 1\)
- \(1 = 0 + 1 = 11(0) + 1\)
Let's substitute these expressions back into our original expression of our four digit number:
$$ \begin{align*} &1000a + 100b + 10c + d \\ &= [11(91)-1]a + [11(9) + 1]b + [11(1) -1]c \\ &\quad + [11(0) + 1]d \\ &= 11(91)a - a + 11(9)b + b + 11(1)c - c \\ &\quad + 11(0)d + d \\ &= 11(91a + 9b + 1c) + (-a + b - c + d) \end{align*} $$
For the four digit number to be divisible by 11, both parts of this expression need to be a multiple of 11. The first part: \(11[91a + 9b + 11c]\) is a multiple of 11 no matter what (thanks to the 11 outside of the parentheses). So the full expression will be a multiple of 11 if the second part equals 0 or itself is divisible by 11. Or equivalently: $$-a+b-c+d \equiv 0 (\mod 11)$$
What does this have to do with the numpad?
The evenly spaced grid of 3x3 digits preserves some geometrical relations:
- Moving 1 space right: +1 to the value
- Moving 1 space left: -1 to the value
- Moving 1 space up: +3 to the
- Moving 1 space down: -3 to the value
For the path 1782:
- Start at 1
- Move up two spaces (2 \(\times\) +3 = +6): now at 7
- Move right one space (+1): now at 8
- Move down two spaces (2 \(\times\) -3 = -6): now at 2
- Move left one space (-1): to return to 1
The movements are +6, +1, -6, -1: and they sum to 0 as a closed loop.
Now returning to our alternating sum of the digit values \(-a+b-c+d\).If we denote the starting digit (1) as s, then:
- \(a=s\)
- \(b = s + 6\)
- \(c = s + 6 + 1 = s + 7\)
- \(d = s + 6 + 1 - 6 = s + 1\)
The alternating sum then becomes $$ \begin{align*} -a+b-c+d &= -s + (s+6) \\ &\quad - (s+7) + (s+1) \\ &= -s + s + 6 \\ &\quad- s - 7 + s + 1 \\ &= 0 \checkmark \end{align*} $$
So for any quadrilateral where opposite sides are parallel and equal (traversed in a cyclical path), the movement comes in pairs that cancel. If you move \(+k\) in one direction, after a step you'll move \(-k\) in the opposite direction.
I've blown a handful minds at bars with this little trick, it's a great little icebreaker to strike up a conversation. It does take a little bit of confidence to open with but if you're with the right crowd of nerds, it'll be a huge hit.