OFFSET
0,3
COMMENTS
The author of this sequence is Rodolfo Kurchan, who mentioned this sequence in a Facebook Group "Series", cf. link.
The sequence is finite, with last term a(5274) = 78642. - M. F. Hasler, Sep 17 2016
LINKS
M. F. Hasler, Table of n, a(n) for n = 0..5274 (All terms)
Rodolfo Kurchan, Post in Facebook Group "Series".
PROG
(PARI) {u=[]; (t(k)=if(#Set(k=digits(k))==#k, k)); a=1; for(n=1, 99, print1(a", "); u=setunion(u, [a]); t(u[1])||u[1]++; while(#u>1&&u[2]<=u[1]+1, u=u[^1]); for(k=u[1]+1, 9e9, setsearch(u, k)&&next; (d=t(k))&& !#setintersect(Set(digits(a)), Set(d))&&(a=k)&&next(2))); a} \\ M. F. Hasler, Sep 17 2016
(Python)
def ok(s, t): return len(set(t)) == len(t) and len(set(s+t)) == len(s+t)
def agen(): # generator of complete sequence of terms
aset, k, mink, MAX = {0}, 0, 1, 987654321
while True:
if k < MAX: yield k
else: return
k, s = mink, str(k)
MAX = 10**(10-len(s))
while k < MAX and (k in aset or not ok(s, str(k))):
k += 1
aset.add(k)
while mink in aset: mink += 1
print(list(agen())[:73]) # Michael S. Branicky, Jun 30 2022
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Claudio Meller, Sep 17 2016
EXTENSIONS
Edited by M. F. Hasler, Sep 17 2016
STATUS
approved