i was having a closer look to the other day’s observation about 13² and 31², and i could quickly demonstrate that indeed, for two digit numbers, the only possibilities are 11, 12 and 13. basically, the demo it boils down to the behavior of the last digit when the numbers 0 to 9 get squared.

now this, rather than putting my mind to rest, brought some new questions. see, when doing this squaring number experiment, you can indeed know with which digit your result will end based on the original number. for example, any number ending in 4 will produce a number finished in 6 when squaring. when finished in 3, you’ll get a 9. for 7, a 9 too. for 6, a 6. you can draw a graph that shows how the units of your numbers flow: { 0->0, 1->1, 2->4, 4->6, 5->5, 6->6, 7->9, 8->4, 9->1 }, which has four fixed points. now, the natural question that arises is, what if rather than squaring we start rising the numbers to the third power, or forth, and so on? what kind of patterns/graph will we get? or, how many different graphs will we get?

i couldn’t resist trying out and seeing for myself. this is the experiment:

so, we see than when rising to the cubic power, we get an interesting set of six fixed points and two cycles!! when rising to the forth power, you get something similar to squaring where 1 and 6 become sinks. when fifth powers are computed, however, all the dynamics collapse to 10 fixed points! so it seems we get a rich set of graphs and behaviors. fixed points, sinks, cycles… how many different graphs/dynamics do exist as we increase powers? in theory there are up to 7 source digits landing in 8 destination digits, so that’s at maximum of 2 million potential graphs. do all of them get exist really?

in fact the excitement fades away as soon as we try power 6, which produces the same dynamics as squaring. perhaps just an unfortunate coincidence? not really. seems like power 7 produces the same graph than power 3, and that power 11 and 15 for the matter.

apparently, there are only four different graphs that emerge for all possible power exponents, which are distributed sequentially. how boring…