OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
600 is in the sequence because its base-10 representation includes the digits 0 and 6, but 599 includes neither.
606 is not in the sequence, because, even though its base-10 representation does include the digits 0 and 6, so does 605.
MAPLE
filter:= proc(n)
local L, P;
L:= convert(n-1, base, 10);
if member({0, 6}, {seq({L[i], L[i+1]}, i=1..nops(L)-1)}) then return false fi;
L:= convert(n, base, 10);
member({0, 6}, {seq({L[i], L[i+1]}, i=1..nops(L)-1)});
end proc:
select(filter, [$1..10^4]); # Robert Israel, Nov 18 2014
MATHEMATICA
Transpose[SequencePosition[Table[If[SequenceCount[IntegerDigits[n], {0, 6}]>0||SequenceCount[IntegerDigits[n], {6, 0}]>0, 1, 0], {n, 2200}], {0, 1}]][[2]] (* The program uses the SequencePosition and SequenceCount functions from Mathematica version 10 *) (* Harvey P. Dale, Aug 01 2016 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved