OFFSET
1,1
MATHEMATICA
j58Q[n_]:=Module[{idn=IntegerDigits[n, 9]}, If[SequenceCount[idn, {5, 8}]+ SequenceCount[idn, {8, 5}]>0, 1, 0]]; Transpose[SequencePosition[ Array[ j58Q, 1700], {1, 0}]][[1]] (* The program uses the SequenceCount and SequencePosition functions from Mathematica version 10 *) (* Harvey P. Dale, Sep 09 2015 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved