In March 1955, Pedro A. Pisa discovered this unkillably valid equation:
123789 + 561945 + 642864 = 242868 + 323787 + 761943
Hack away at its terms — from either end — and it remains true:
1 + 5 + 6 = 2 + 3 + 7 12 + 56 + 64 = 24 + 32 + 76 123 + 561 + 642 = 242 + 323 + 761 1237 + 5619 + 6428 = 2428 + 3237 + 7619 12378 + 56194 + 64286 = 24286 + 32378 + 76194 123789 + 561945 + 642864 = 242868 + 323787 + 761943 23789 + 61945 + 42864 = 42868 + 23787 + 61943 3789 + 1945 + 2864 = 2868 + 3787 + 1943 789 + 945 + 864 = 868 + 787 + 943 89 + 45 + 64 = 68 + 87 + 43 9 + 5 + 4 = 8 + 7 + 3
Stab it in the heart, removing the two center digits from each term, and it still balances:
1289 + 5645 + 6464 = 2468 + 3287 + 7643
Do this again and it still balances:
19 + 55 + 64 = 28 + 37 + 73
Most amazing: you can square every term above, in every equation, and they'll all remain true.
Six $$n$$-digit numbers ($$n \in \mathbb{N}_0$$) that do not contain the digit zero (0), each on a separate line.
Each line of the output contains an equation whose left-hand side sums part of the digits of the first three numbers from the input and whose right-hand side sums part of the digits of the last three numbers from the input. The parts successively consist of
the first $$i$$ digits from each term ($$i = 1, \ldots n - 1$$; left aligned)
all digits from each term
the last $$i$$ digits from each term ($$i = n - 1, \ldots 1$$; right aligned)
Place an equality sign (=) or an inequality sign (≠) between the left-hand side and the right-hand side of each equation to indicate whether or not the equation holds. Put one space before and after each plus sign (+), equality sign (=) and inequality sign (≠).
The terms must be aligned across $$n$$ positions by adding leading or trailing spaces. There should never be spaces at the end of a line.
Input:
123789
561945
642864
242868
323787
761943
Output:
1 + 5 + 6 = 2 + 3 + 7
12 + 56 + 64 = 24 + 32 + 76
123 + 561 + 642 = 242 + 323 + 761
1237 + 5619 + 6428 = 2428 + 3237 + 7619
12378 + 56194 + 64286 = 24286 + 32378 + 76194
123789 + 561945 + 642864 = 242868 + 323787 + 761943
23789 + 61945 + 42864 = 42868 + 23787 + 61943
3789 + 1945 + 2864 = 2868 + 3787 + 1943
789 + 945 + 864 = 868 + 787 + 943
89 + 45 + 64 = 68 + 87 + 43
9 + 5 + 4 = 8 + 7 + 3
Input:
1959
9336
3117
2216
7361
4835
Output:
1 + 9 + 3 = 2 + 7 + 4
19 + 93 + 31 = 22 + 73 + 48
195 + 933 + 311 ≠ 221 + 736 + 483
1959 + 9336 + 3117 = 2216 + 7361 + 4835
959 + 336 + 117 = 216 + 361 + 835
59 + 36 + 17 = 16 + 61 + 35
9 + 6 + 7 ≠ 6 + 1 + 5
In 2016, Jean-Claude Georges discovered that the equalities remain valid when any combination of digits is removed consistently across terms. For example, starting from
123789 + 561945 + 642864 = 242868 + 323787 + 761943
and removing the first, third and fifth digit from each number
123789 +561945 +642864 =242868 +323787 +761943
gives
279 + 695 + 484 = 488 + 277 + 693 (= 1458)
and squaring each term gives
77841 + 483025 + 234256 = 238144 + 76729 + 480249 (= 795122)
Amazingly, the same is true for any combination — for example, the equations remain valid when the first, second, fourth, and sixth digits of each term are removed.