TransWikia.com

Cube the digits and carry on

Puzzling Asked on October 4, 2021

Take a number between 2001 and 2100 inclusive. Cube the digits of the number and add them together, then repeat the process with the new sum and restart the process over and over. For example if I take 2016, the next number will then be 225, then 141, then 66, then 432, then 99, then 1458, then 702, then 351, then 153, then 153, then 153,… and 153 reappears forever. How many numbers between 2001 and 2100 inclusive have a 153 never ending loop? Please don’t use computers.

2 Answers

I observed the following:

This is because

This observation immediately excludes many numbers from consideration.

It remains to be shown that the numbers that were not excluded do all end at $153$.

For completeness, here is my working out of the remaining cases. Rand al'Thor already did this first in his answer. Like him, I do not see any clever way that this work can be avoided.

Correct answer by Jaap Scherphuis on October 4, 2021

Considering cycles

The largest number such a chain can ever reach is $1486$ (every number between $2001$ and $2100$ gives at most $8+0+729+729=1466$ at the first step, and the largest possibility resulting from any number up to there is $1+27+729+729=1486$). So we have an upper bound, which means every chain must eventually end in a cycle.

In the OP you mentioned $overline{153}$ as a cycle of length 1; there are only five cycles of length 1, namely $overline{1}$, $overline{153}$, $overline{370}$, $overline{371}$, $overline{407}$. I found most of these and also a length-three cycle $overline{133rightarrow55rightarrow250}$ just by experimenting with starting with single-digit numbers:

  • $9rightarrow729rightarrow1080rightarrow513rightarrowoverline{153}$

  • $8rightarrow512rightarrow134rightarrow92rightarrow737rightarrow713rightarrowoverline{371}$

  • $7rightarrow343rightarrow118rightarrow514rightarrow190rightarrow730rightarrowoverline{370}$

  • $6rightarrow216rightarrow225rightarrow141$, goes to $overline{153}$ as in the OP.

  • $5rightarrow125$, goes to $overline{371}$ as for $8rightarrow512$ above.

  • $4rightarrow64rightarrow280rightarrow520rightarrowoverline{133rightarrow55rightarrow250}$

  • $3rightarrow27rightarrow351rightarrowoverline{153}$

  • $2rightarrow8$, goes to $overline{371}$ as seen above.

  • $overline{1}$ is of course its own fixed cycle.

Eliminating cases

The chain you've given in the OP also gives a bunch of numbers that must end with $overline{153}$:

Knowing that $9$ goes there also gives:

However, from $8$ and $4$ we also find that

So far, among the 100 given starting points, we know that 13 of them do go to $overline{153}$ and 6 of them don't. We also know the ending point must be a cycle, either one of the five possible single-point cycles or a multi-point cycle; at least one multi-point cycle is possible, but I don't know how many are.

As Jaap Scherpuis astutely notes, the only possible numbers which could go to $overline{153}$ are

We already know 13 of these do go to $overline{153}$, so that leaves 21 left to check. Checking the first couple of them:

Now we already get ten more for free:

Next one:

giving us four more for free:

Only seven left to check, namely

We just need to check four of these:

Final solution

Answered by Rand al'Thor on October 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP