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.

A033863 Least number of Sort-then-add persistence n.

This page as a plain text file.
%I A033863 #21 Feb 16 2025 08:32:36
%S A033863 1,10,65,64,175,98,240,325,302,387,198,180,550,806,855,486,351,315,
%T A033863 944,2428,2204,3172,1793,1316,937,2775,1815,1461,2541,9378,13327,9638,
%U A033863 8149,6581,46965,23487,12198,10599,10920,52345,48788,180666,174870,291119,155563,915443
%N A033863 Least number of Sort-then-add persistence n.
%H A033863 Michael S. Branicky, <a href="/A033863/b033863.txt">Table of n, a(n) for n = 0..100</a>
%H A033863 Sean A. Irvine, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a033/A033863.java">Java program</a> (github).
%H A033863 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Sort-Then-AddSequence.html">Sort-Then-Add Sequence</a>.
%o A033863 (Python)
%o A033863 from itertools import count, islice
%o A033863 def agen(LIMIT):
%o A033863     adict, n = dict(), 0
%o A033863     for k in count(1):
%o A033863         c, m = 0, k
%o A033863         while c <= LIMIT and m != (s:=int("".join(sorted(str(m))))):
%o A033863             m += s; c += 1
%o A033863         if c not in adict:
%o A033863             adict[c] = k
%o A033863             while n in adict and n <= LIMIT: yield adict[n]; n += 1
%o A033863             if n > LIMIT: return
%o A033863 print(list(agen(40))) # _Michael S. Branicky_, Jan 16 2024
%Y A033863 Cf. A033909, A033908.
%K A033863 nonn,base
%O A033863 0,2
%A A033863 _David W. Wilson_
%E A033863 a(44)-a(45) from _Sean A. Irvine_, Jul 26 2020