OFFSET
1,1
MATHEMATICA
Transpose[SequencePosition[Table[If[SequenceCount[IntegerDigits[n, 9], {5, 8}]>0||SequenceCount[IntegerDigits[n, 9], {8, 5}]>0, 1, 0], {n, 2000}], {0, 1}]][[2]] (* The program uses the SequencePosition and SequenceCount functions from Mathematica version 10 *) (* Harvey P. Dale, Dec 23 2015 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved