A Self-Terminating Sequence (Posted on 2015-01-29)
Start with an integer n. Multiply its smallest and largest digits together and add their product to n, forming the second term in the sequence. Repeat this process until n stops changing.
Example: 231, 234, 242, 250, 250. This is a 4-term sequence.
What is the longest sequence for starting values less than 30,000?