OFFSET
0,2
LINKS
EXAMPLE
a(0) = 0
a(1) = 10 (from digit 0 in a(0)=0, smallest integer other than 0).
a(2) = 1 (from digit 1 in a(1)=10, smallest integer other than 10).
a(3) = 20 (from digit 0 in a(1)=10, smallest integer other than 0 and 10).
a(4) = 11 (from digit 1 in a(2)=1, smallest integer other than 1 and 10).
a(5) = 2 (from digit 2 in a(3)=20, smallest integer other than 20).
a(6) = 30 (from digit 0 in a(3)=20, smallest integer other than 0, 10, and 20).
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
s, aset, mink = "0", set(), 0
for n in count(0):
an = mink
while an in aset or set(san:=str(an)) & {s[0]} == set(): an += 1
s = s[1:] + san
aset.add(an)
yield an
while mink in aset: aset.discard(mink); mink += 1
print(list(islice(agen(), 67))) # Michael S. Branicky, Apr 25 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gavin Lupo, Apr 17 2023
STATUS
approved