login
Numbers n such that string 6,7 occurs in the base 9 representation of n but not of n-1.
1

%I #10 May 02 2021 13:57:56

%S 61,142,223,304,385,466,547,549,628,709,790,871,952,1033,1114,1195,

%T 1276,1278,1357,1438,1519,1600,1681,1762,1843,1924,2005,2007,2086,

%U 2167,2248,2329,2410,2491,2572,2653,2734,2736,2815

%N Numbers n such that string 6,7 occurs in the base 9 representation of n but not of n-1.

%H Harvey P. Dale, <a href="/A044312/b044312.txt">Table of n, a(n) for n = 1..1000</a>

%t Select[Range[5000],MemberQ[Partition[IntegerDigits[#,9],2,1],{6,7}] && !MemberQ[Partition[IntegerDigits[#-1,9],2,1],{6,7}]&] (* _Harvey P. Dale_, May 12 2012 *)

%t SequencePosition[Table[If[SequenceCount[IntegerDigits[n,9],{6,7}]>0,1,0],{n,3000}],{0,1}][[All,2]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 02 2021 *)

%K nonn,base

%O 1,1

%A _Clark Kimberling_