login
Numbers n such that string 1,3 occurs in the base 8 representation of n but not of n+1.
0

%I #9 Feb 05 2019 17:25:55

%S 11,75,95,139,203,267,331,395,459,523,587,607,651,767,779,843,907,971,

%T 1035,1099,1119,1163,1227,1291,1355,1419,1483,1547,1611,1631,1675,

%U 1739,1803,1867,1931,1995,2059,2123,2143,2187,2251

%N Numbers n such that string 1,3 occurs in the base 8 representation of n but not of n+1.

%t Select[Range[2300],MemberQ[Partition[IntegerDigits[#,8],2,1],{1,3}] && !MemberQ[Partition[IntegerDigits[#+1,8],2,1],{1,3}]&] (* _Harvey P. Dale_, Oct 10 2013 *)

%t SequencePosition[Table[If[SequenceCount[IntegerDigits[n,8],{1,3}]>0,1,0],{n,2300}],{1,0}][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Feb 05 2019 *)

%K nonn,base

%O 1,1

%A _Clark Kimberling_