OFFSET
1,1
COMMENTS
316 is almost certainly the least starter not leading to a sorted element.
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Sort-Then-Add Sequence.
EXAMPLE
a(1) = 316, a(2) = a(1)+sort(a(1)) = 316 + 136 = 452, a(3) = a(2) + sort(a(2)) = 452 + 245 = 697. - Indranil Ghosh, Jan 29 2017
MATHEMATICA
NestList[#+FromDigits[Sort[IntegerDigits[#]]]&, 316, 40] (* Harvey P. Dale, Jan 28 2013 *)
PROG
(Python)
A033861_list = [316]
for i in range(100):
x = A033861_list[-1]
A033861_list.append(x+int(''.join(sorted(str(x))))) # Chai Wah Wu, Feb 07 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved