Saturday, November 30, 2019

[htahdnnu] Fun with long multiplication

Create multiplication problems whose answers are aesthetically pretty, and encourage doing them by hand.  Some examples of pretty answers are a*(10^n-1)/9 = aaaaaaaaa, aaabbbbbbaaa, 1234321, 23455432, 776543222345677, ababaaaababa.  Note that although ababaababa is pretty, ababa * 100001 is trivial to multiply.

Somewhat less pretty: 776543222, 777665544332, aaaabbb.

Composing such problems is possible because factorization of small integers (small enough for a human to multiply by hand) is not too difficult with a computer.

Solving such problems has a feel similar to a crossword puzzle in that you can tell your answer is probably correct if its digit pattern is pretty.

This could be turned into exactly a crossword (cross-number) puzzle, though that seems a bit overkill.

aaabaaa and ababaaababa are pretty, but differ by only one digit from another pretty digit string, aaaaaaa and abababababa respectively, so those results would be difficult to tell if you multiplied correctly just by the prettiness of the result.  But casting out nines or elevens would help.

Similarly the less pretty aaaabbb versus aaabbbb.

Inspired by 2071723 * 5363222357 = 11111111111111111 , but we don't necessarily need the factors to be prime, so combine them until there are only two, ideally of similar magnitudes.

We could also consider binary, for which long multiplication is equivalent to the Russian Peasant algorithm.  2^a-1 = 1^a (the operator ^ means exponentiation on the left, string repetition on the right) and 1^a 0^b 1^a cover many pretty numbers, including Mersenne and Fermat.  Then (10)^a (0^b|1^b) (01)^a.

No comments :