OFFSET
1,2
COMMENTS
The sequence is finite; after 14594 terms, where a(14594) = 20858, the sum of all terms is 173658294 which contains the digits 1..9, so the next term does not exist.
The largest term is a(12742) = 888888.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..14594
EXAMPLE
a(14) = 20 as the sum of all terms a(1)..a(13) = 91, and 20 is the smallest unused number that does not contain the digits 1 or 9.
PROG
(Python)
from itertools import islice
def agen():
s, aset, mink = 0, {0}, 1
while True:
k, dset = mink, set(str(s))
if dset >= set("123456789"): break
while k in aset or set(str(k)) & dset: k += 1
an = k; aset.add(an); s += an; yield an
while mink in aset: mink += 1
print(list(islice(agen(), 80))) # Michael S. Branicky, Dec 21 2023
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Scott R. Shannon, Dec 21 2023
STATUS
approved