A353696 Numbers k such that the k-th composition in standard order (A066099) is empty, a singleton, or has run-lengths that are a consecutive subsequence that is already counted.
0, 1, 2, 4, 8, 10, 16, 32, 43, 58, 64, 128, 256, 292, 349, 442, 512, 586, 676, 697, 826, 1024, 1210, 1338, 1393, 1394, 1396, 1594, 2048, 2186, 2234, 2618, 2696, 2785, 2786, 2792, 3130, 4096, 4282, 4410, 4666, 5178, 5569, 5570, 5572, 5576, 5584, 6202, 8192
Offset: 1
Keywords
Examples
The terms together with their corresponding compositions begin: 0: () 1: (1) 2: (2) 4: (3) 8: (4) 10: (2,2) 16: (5) 32: (6) 43: (2,2,1,1) 58: (1,1,2,2) 64: (7) 128: (8) 256: (9) 292: (3,3,3) 349: (2,2,1,1,2,1) 442: (1,2,1,1,2,2) 512: (10) 586: (3,3,2,2) 676: (2,2,3,3) 697: (2,2,1,1,3,1) 826: (1,3,1,1,2,2)
Crossrefs
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; yoyQ[y_]:=Length[y]<=1||MemberQ[Join@@Table[Take[y,{i,j}],{i,Length[y]},{j,i,Length[y]}],Length/@Split[y]]&&yoyQ[Length/@Split[y]]; Select[Range[0,1000],yoyQ[stc[#]]&]
Comments