A355321 Numbers k such that the k-th composition in standard order has the same number of even parts as odd.
0, 5, 6, 17, 18, 20, 24, 43, 45, 46, 53, 54, 58, 65, 66, 68, 72, 80, 96, 139, 141, 142, 149, 150, 154, 163, 165, 166, 169, 172, 177, 178, 180, 184, 197, 198, 202, 209, 210, 212, 216, 226, 232, 257, 258, 260, 264, 272, 288, 320, 343, 347, 349, 350, 363, 365
Offset: 1
Keywords
Examples
The terms together with their corresponding compositions begin: 0: () 5: (2,1) 6: (1,2) 17: (4,1) 18: (3,2) 20: (2,3) 24: (1,4) 43: (2,2,1,1) 45: (2,1,2,1) 46: (2,1,1,2) 53: (1,2,2,1) 54: (1,2,1,2) 58: (1,1,2,2) 65: (6,1) 66: (5,2) 68: (4,3) 72: (3,4) 80: (2,5) 96: (1,6)
Crossrefs
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; Select[Range[0,100],Count[stc[#],?EvenQ]==Count[stc[#],?OddQ]&]
Comments