login
A033863
Least number of Sort-then-add persistence n.
5
1, 10, 65, 64, 175, 98, 240, 325, 302, 387, 198, 180, 550, 806, 855, 486, 351, 315, 944, 2428, 2204, 3172, 1793, 1316, 937, 2775, 1815, 1461, 2541, 9378, 13327, 9638, 8149, 6581, 46965, 23487, 12198, 10599, 10920, 52345, 48788, 180666, 174870, 291119, 155563, 915443
OFFSET
0,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..100
Sean A. Irvine, Java program (github).
Eric Weisstein's World of Mathematics, Sort-Then-Add Sequence.
PROG
(Python)
from itertools import count, islice
def agen(LIMIT):
adict, n = dict(), 0
for k in count(1):
c, m = 0, k
while c <= LIMIT and m != (s:=int("".join(sorted(str(m))))):
m += s; c += 1
if c not in adict:
adict[c] = k
while n in adict and n <= LIMIT: yield adict[n]; n += 1
if n > LIMIT: return
print(list(agen(40))) # Michael S. Branicky, Jan 16 2024
CROSSREFS
Sequence in context: A352113 A286070 A033908 * A233246 A229996 A255245
KEYWORD
nonn,base
EXTENSIONS
a(44)-a(45) from Sean A. Irvine, Jul 26 2020
STATUS
approved