OFFSET
1,3
COMMENTS
10 is obviously the first integer not present in the sequence as 1 > 0.
The last term is a(173) = 122222, at which point the cumulative sum is 12467999, and the sequence cannot be extended. - Michael S. Branicky, Feb 05 2024
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..173
EXAMPLE
Terms a(1) = 0 to a(5) = 5 sum up to 11: those six numbers have digits in nondecreasing order;
terms a(1) = 0 to a(6) = 4 sum up to 15: those seven numbers have digits in nondecreasing order;
terms a(1) = 0 to a(7) = 7 sum up to 22: those eight numbers have digits in nondecreasing order; etc.
PROG
(Python)
def nondec(n): s = str(n); return s == "".join(sorted(s))
def aupton(terms):
alst = [0]
for n in range(2, terms+1):
an, cumsum = 1, sum(alst)
while True:
while an in alst: an += 1
if nondec(an) and nondec(cumsum + an): alst.append(an); break
else: an += 1
return alst
print(aupton(100)) # Michael S. Branicky, Mar 07 2021
CROSSREFS
KEYWORD
base,nonn,fini,full
AUTHOR
Eric Angelini and Carole Dubois, Mar 07 2021
STATUS
approved