Saturday, February 27, 2016

A Puzzle About Doubling and Squaring

Last night my younger asked: "Is 7 times 7 equal to 41? Because that's how it works for 9."

At first her question was mysterious to us. Then she explained that she knew that 9 + 9 = 18, and she had heard that 9 × 9 = 81, and she had noticed that in 18 and 81, the digits are reversed. So what she wanted to know was, does it work the same way for 7? Given that 7 + 7 = 14, can you conclude that 7 × 7 = 41?

It was a great question! But no, we answered, it doesn't work that way. A little reflection shows that 2 and 9 are the only positive integers for which doubling and squaring yield identical digits, up to ordering. (There will never be a multi-digit case, because squaring a multi-digit number always yields more digits than doubling it.)

However, 434 is an interesting case, because 434 + 434 = 868, and 434 × 434 = 188,356, so 434 has the property that the digits of the double are a subset of the digits of the square, counting multiplicity.

Another example like that is 99, because 99 + 99 = 198 and 99 × 99 = 9,801.

In fact, any number of the form 99...9 works this way. Can you show that the digits of 99...9 + 99...9 are the same as the digits of 99...9 × 99...9, discounting zero digits?

There are 4,747,374 integers k in the range 1 ≤ k ≤ 10^8 such that the digits of k + k are a subset of the digits of k × k, counting multiplicity. Of these, 83,238 are such that every digit appearing in k × k also appears in k + k.

P.S., Update just to add this graph, which is a scatterplot of (x, y) where x is a number between 1 and 10,000 and y is the number you get by reversing the digits of x. For example, the plot contains the point (46, 64) and the point (2539, 9352).


No comments: