Now take all the digits and cube them and add the cubes together . . .

Take that new number and do the same thing . . ."

Pat Ballew introduced this problem on his blog. G.H. Hardy said, there is nothing in [this] which appeals much to a mathematician. The proofs are neither difficult nor interesting . . ." Nevertheless, I thought it was worthy of some inspection, or at least a pretty picture.

- Since 149, 491, 1490, and so on all go to the same place, I just thought of all of 24 permuatations of digits as one class and made it one node in the graph. For the rest of this exposition, I'll represent the class containing 149 as {149}.
- In the graph, unless it was an endpoint, each class is represented by the permuation with the smallest value.
- Negative numbers just denote that it takes one more step to really get to a terminal point or cycle. For example, 112 goes to 10 then to 1, which is represented by $$ \{112\} \rightarrow \{-1\} \rightarrow \{1\}. $$ This ensures that any path has the correct length.
- The area of each node is proportional to the number of permutations; for example, {7} contains 7, 70, 700, or 7000, whereas {7777} contains one number.

- The roots 1, 153, 370, 371, and 407 are Armstrong Numbers.
- In total, there are nine 'endgames.'
- By starting with 1, 2, 3, . . . , you learn them all when you reach 136.
- All cycles occur with numbers that are conguent to 1 (mod 3), but the converse isn't true because of the root 370.

- The longest paths all terminate at the root 153, starting with either {177}, {4467}, {4677}, or {4779}. This is probably expected since one-third of all numbers are in this tree.
- In terms of numbers, the biggest logjams occur at 856, 980, and 945, with three incoming edges $$( \mbox{i.e., } 178 \rightarrow 1^3 + 7^3 + 8^3 = 856, 1159 \rightarrow 856, \mbox{ and } 4468 \rightarrow 856).$$ The number 980 is a tail for 60 numbers, more than the others, including all elements in {578}, {1559}, and {2379}.
- In terms of classes, the biggest logjams in the graph occur at {18}, {125}, {127}, and {189}, each with ten heads of edges.
- Since classes like {459} and {1245} have lots of elements and feed into {127}, that logjam is probably most intense.
- Nine of the twelve elements of {18} are heads of some edge. This is the highest density for one class, matched by smaller classes {1}, which is a terminal point, and {8}.

How many numbers terminate with . . . | 3 digit numbers | 4 digit numbers | 5 digit numbers |
---|---|---|---|

1 | 9 | 100 | 1195 |

136, 244 | 9 | 160 | 1490 |

919, 1459 | 24 | 341 | 3070 |

407 | 30 | 396 | 3931 |

160, 217, 352 | 51 | 438 | 4140 |

55, 250, 133 | 66 | 518 | 5253 |

370 | 174 | 1776 | 18185 |

371 | 303 | 2937 | 29402 |

153 | 333 | 3333 | 33333 |