# Can you explain this cyclic number sequence

Can you work out the mathematical rule for this cyclic number sequence?

2, 6, 186, 8, 456, 54, 53, 23, 7, 301, 3, 21, 2, 6,.....

Hint 1

this is a mathematical puzzle

From time to time hints will be updated.

Note: this sequence cannot be found in The On-Line Encyclopedia of Integer Sequences

The next number in the sequence is derived from the preceding number by the smallest digit cubed, less the smallest digit squared, plus the largest digit.

For a single-digit number $x$ this is simply $x^3 - x^2 + x$. For example $2$:
$$2 \Rightarrow 2^3 - 2^2 + 2 \Rightarrow 8 - 4 + 2 = 6$$
As an example for a three digit number, e.g. $456$:
Smallest digit is $4$, largest is $6$, so:
$$456 \Rightarrow 4^3 - 4^2 + 6 \Rightarrow 64 - 16 + 6 = 54$$

As an example of a two digit number, e.g. $54$:
Smallest digit is $4$, largest is $5$, so:
$$54 \Rightarrow 4^3 - 4^2 + 5 \Rightarrow 64 - 16 + 5 = 53$$

• Pardon me for asking, but how in the ever-loving bull-shattering hello there did you figure that one out? – Bass Mar 19 '18 at 5:15
• @Bass, I suppose, by finding the next number from a single-digit number? e.g. 2 to 6, 6 to 186, or 7 to 301. Turned out that the number after $x$ is $x^3 - (x(x-1))$. Then proceed how to generalize it with 2 and 3-digit numbers. (At least this is what I tried, but haven't generalized it. Good work for TheOmegaPostulate!) – athin Mar 19 '18 at 6:29
• @Bass, exactly what athin said for the single digit ones. From there I generalised to the two, and then three digits by focusing on "interesting" sequences (e.g. 54 -> 53 -> 23 as there is a change of one followed by a change of 30, and 301 as one digit is a zero). – TheOmegaPostulate Mar 19 '18 at 7:12
• Great Job, well done! – tom Mar 19 '18 at 7:31