login
Numbers n such that string 5,1 occurs in the base 10 representation of n but not of n-1.
0

%I #7 Jul 25 2019 20:31:10

%S 51,151,251,351,451,510,551,651,751,851,951,1051,1151,1251,1351,1451,

%T 1510,1551,1651,1751,1851,1951,2051,2151,2251,2351,2451,2510,2551,

%U 2651,2751,2851,2951,3051,3151,3251,3351,3451,3510

%N Numbers n such that string 5,1 occurs in the base 10 representation of n but not of n-1.

%t SequencePosition[Table[If[SequenceCount[IntegerDigits[n],{5,1}]>0,1,0],{n,3600}],{0,1}][[All,2]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 25 2019 *)

%K nonn,base

%O 1,1

%A _Clark Kimberling_