The Wayback Machine - https://web.archive.org/web/20210307033920/https://mathworld.wolfram.com/Sort-Then-AddSequence.html

Sort-Then-Add Sequence

DOWNLOAD Mathematica Notebook

The sequence produced by sorting the digits of a number and adding them to the previous number. The values starting with n=1, 2, ... are 2, 4, 6, 8, 10, 12, 14, 16, 18, 11, 22, 24, ... (OEIS A070196).

If the sorting-then-adding algorithm is applied iteratively until a sorted number is obtained, then for n=1, 2, ..., the algorithm terminates on 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 33, ... (OEIS A033862). The first few numbers not known to terminate are 316, 452, 697, 1376, 2743, 5090, ... (OEIS A033861). The least numbers of sort-then-add persistence n=1, 2, ..., are 1, 10, 65, 64, 175, 98, 240, 325, 302, 387, 198, 180, 550, ... (OEIS A033863).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.