OFFSET
0,3
COMMENTS
This is not a permutation of the nonnegative integers. E.g. 123456789 and 1023456789 (the smallest pandigital number) are not members.
a(n) = n for n = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 34, 84, 104, 105, 1449, 2889, 3183, ...
LINKS
Zak Seidov, Table of n, a(n) for n = 0..5000
MATHEMATICA
s={0, 1}; Do[a=s[[-2]]; n=2; While[MemberQ[s, n]||Intersection [IntegerDigits[a], IntegerDigits[n]]≠{}, n++]; AppendTo[s, n], {100}]; s
PROG
(Python)
from itertools import count, islice, product as P
def only(s, D=1): # numbers with >= D digits only from s
yield from (int("".join(p)) for d in count(D) for p in P(s, repeat=d))
def agen(): # generator of terms
aset, an1, an, minan = {0, 1}, 0, 1, 2
yield from [0, 1]
while True:
an1, an, s = an, minan, set(str(an1))
use = "".join(c for c in "0123456789" if c not in s)
for an in only(use, D=len(str(minan))):
if an not in aset: break
aset.add(an)
yield an
while minan in aset: minan += 1
print(list(islice(agen(), 75))) # Michael S. Branicky, Jun 30 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov and Eric Angelini, Sep 06 2016
STATUS
approved