OFFSET
1,1
MATHEMATICA
SequencePosition[Table[If[SequenceCount[IntegerDigits[n, 6], {3, 5}]>0 || SequenceCount[ IntegerDigits[n, 6], {5, 3}]>0, 1, 0], {n, 1000}], {0, 1}][[All, 2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 05 2017 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved