OFFSET
0,2
COMMENTS
a(n+1) = a(n)+1 unless a(n) is of the form d*10^k - 1, 1<=d<=8. - Robert Israel, Sep 21 2016
LINKS
Harry J. Smith, Table of n, a(n) for n=0,...,1000
MAPLE
A[0]:= 0: S:= {0}:
for n from 1 to 1000 do
for x from A[n-1]+1 do
Sx:= convert(convert(x, base, 10), set);
if Sx intersect S <> {} then break fi;
od;
A[n]:= x;
S:= Sx;
od:
seq(A[i], i=0..1000); # Robert Israel, Sep 21 2016
MATHEMATICA
NestList[Block[{k = # + 1}, While[! IntersectingQ[IntegerDigits@ k, IntegerDigits@ #], k++]; k] &, 0, 66] (* Michael De Vlieger, Sep 20 2016 *)
PROG
(PARI) XhasD(x, d)= { local(f); while (x>9, f=x-10*(x\10); if (f==d, return(1)); x\=10); return(x==d) } { a=0; for (n=0, 1000, if (n, for (m=a + 1, 10*a + 10, b=0; for (d=0, 9, if (XhasD(a, d) && XhasD(m, d), a=m; b=true; break)); if (b, break) ) ); write("b063662.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 27 2009
(Haskell)
a063662_list = iterate a063660 0 -- Reinhard Zumkeller, Jan 15 2013
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Reinhard Zumkeller, Jul 25 2001
STATUS
approved