login
Numbers n such that string 4,2 occurs in the base 8 representation of n but not of n-1.
0

%I #7 Dec 26 2019 13:58:26

%S 34,98,162,226,272,290,354,418,482,546,610,674,738,784,802,866,930,

%T 994,1058,1122,1186,1250,1296,1314,1378,1442,1506,1570,1634,1698,1762,

%U 1808,1826,1890,1954,2018,2082,2146,2176,2274,2320

%N Numbers n such that string 4,2 occurs in the base 8 representation of n but not of n-1.

%t SequencePosition[Table[If[SequenceCount[IntegerDigits[n,8],{4,2}]>0,1,0],{n,2500}],{0,1}][[All,2]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Dec 26 2019 *)

%K nonn,base

%O 1,1

%A _Clark Kimberling_