cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A033861 Sort-then-add sequence: a(1) = 316, a(n+1) = a(n) + sort(a(n)).

This page as a plain text file.
%I A033861 #25 Feb 16 2025 08:32:36
%S A033861 316,452,697,1376,2743,5090,5149,6608,7276,9953,13552,25907,28486,
%T A033861 53174,66631,80297,83086,86774,133552,256907,282586,508274,532852,
%U A033861 756410,770977,848756,1305544,1439999,2789998,5578997,11156896
%N A033861 Sort-then-add sequence: a(1) = 316, a(n+1) = a(n) + sort(a(n)).
%C A033861 316 is almost certainly the least starter not leading to a sorted element.
%H A033861 Indranil Ghosh, <a href="/A033861/b033861.txt">Table of n, a(n) for n = 1..10000</a>
%H A033861 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Sort-Then-AddSequence.html">Sort-Then-Add Sequence.</a>
%e A033861 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 A033861 NestList[#+FromDigits[Sort[IntegerDigits[#]]]&,316,40] (* _Harvey P. Dale_, Jan 28 2013 *)
%o A033861 (Python)
%o A033861 A033861_list = [316]
%o A033861 for i in range(100):
%o A033861     x = A033861_list[-1]
%o A033861     A033861_list.append(x+int(''.join(sorted(str(x))))) # _Chai Wah Wu_, Feb 07 2020
%Y A033861 Cf. A033860, A033862, A033863.
%K A033861 nonn,base
%O A033861 1,1
%A A033861 _David W. Wilson_