Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #24 Feb 08 2020 04:34:51
%S 316,452,697,1376,2743,5090,5149,6608,7276,9953,13552,25907,28486,
%T 53174,66631,80297,83086,86774,133552,256907,282586,508274,532852,
%U 756410,770977,848756,1305544,1439999,2789998,5578997,11156896
%N Sort-then-add sequence: a(1) = 316, a(n+1) = a(n) + sort(a(n)).
%C 316 is almost certainly the least starter not leading to a sorted element.
%H Indranil Ghosh, <a href="/A033861/b033861.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Sort-Then-AddSequence.html">Sort-Then-Add Sequence.</a>
%e 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
%t NestList[#+FromDigits[Sort[IntegerDigits[#]]]&,316,40] (* _Harvey P. Dale_, Jan 28 2013 *)
%o (Python)
%o A033861_list = [316]
%o for i in range(100):
%o x = A033861_list[-1]
%o A033861_list.append(x+int(''.join(sorted(str(x))))) # _Chai Wah Wu_, Feb 07 2020
%Y Cf. A033860, A033862, A033863.
%K nonn,base
%O 1,1
%A _David W. Wilson_