A043884 Numbers k such that 1 and 3 occur juxtaposed in the base-4 representation of k but not of k+1.
7, 13, 23, 31, 39, 45, 55, 61, 71, 77, 87, 95, 103, 109, 127, 135, 141, 151, 159, 167, 173, 183, 189, 199, 205, 223, 231, 237, 247, 253, 263, 269, 279, 287, 295, 301, 311, 317, 327, 333, 343, 351, 359, 365, 383, 391, 397, 407, 415
Offset: 1
Crossrefs
Cf. A007090.
Programs
-
Mathematica
SequencePosition[Table[If[SequenceCount[IntegerDigits[n,4],{1,3}]>0 || SequenceCount[IntegerDigits[n,4],{3,1}]>0,1,0],{n,500}],{1,0}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 13 2020 *)