login
A063662
Starting with 0, select the next number having in decimal notation at least one common digit.
3
0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 43, 44, 45, 46, 47, 48, 49, 54, 55, 56, 57, 58, 59, 65, 66, 67, 68, 69, 76, 77, 78, 79, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 109, 110, 111, 112
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
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
A063662(0) = 0 and A063662(n + 1) = A063660(A063662(n))
Sequence in context: A225683 A326734 A256556 * A069715 A248499 A008716
KEYWORD
easy,nonn,base
AUTHOR
Reinhard Zumkeller, Jul 25 2001
STATUS
approved