OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
N:= 10000: # to get all terms <= N
V:= Vector(N, n -> StringTools:-RegMatch("59|95", convert(n, string))):
select(t -> V[t] and not V[t-1], [$2..N]); # Robert Israel, Dec 11 2015
MATHEMATICA
SequencePosition[Table[If[SequenceCount[IntegerDigits[n], {5, 9}]>0 || SequenceCount[ IntegerDigits[n], {9, 5}]>0, 1, 0], {n, 2500}], {0, 1}][[All, 2]] (* Harvey P. Dale, Jul 20 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved