OFFSET
1,3
COMMENTS
The first 0 means: "next integer cannot be of length zero", thus "1" ("1" being the first available integer not yet in the sequence). Now this "1" reads: "next integer cannot be of length one", thus 10 ("10" being the first two-digit integer not yet in the sequence). The next digit to be read is the "1" digit of this "10": "next integer cannot be of length one", thus 11 ("11" being the smallest two-digit integer not yet in the sequence). The next digit to be read is the "0" digit of "10" which produces "2" ("2" is not of length zero and is the smallest available integer after "1", already in the sequence) "next 10 11 2 12 13 3 14 4 15
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
an, aset, dlst, m = 0, {0}, [None, 0], 1
for n in count(1):
yield an
an = next(k for k in count(m) if k not in aset and len(str(k)) != dlst[n])
aset.add(an)
dlst.extend(map(int, str(an)))
while m in aset: m += 1
print(list(islice(agen(), 65))) # Michael S. Branicky, Oct 04 2024
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Jan 27 2005
EXTENSIONS
Offset changed and a(33) and beyond from Michael S. Branicky, Oct 04 2024
STATUS
approved