A346633 Sum of even-indexed parts (even bisection) of the n-th composition in standard order.
0, 0, 0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 3, 2, 1, 2, 0, 1, 2, 1, 3, 2, 1, 2, 4, 3, 2, 3, 1, 2, 3, 2, 0, 1, 2, 1, 3, 2, 1, 2, 4, 3, 2, 3, 1, 2, 3, 2, 5, 4, 3, 4, 2, 3, 4, 3, 1, 2, 3, 2, 4, 3, 2, 3, 0, 1, 2, 1, 3, 2, 1, 2, 4, 3, 2, 3, 1, 2, 3, 2, 5, 4, 3, 4, 2, 3, 4
Offset: 0
Keywords
Examples
Composition number 741 in standard order is (2,1,1,3,2,1), so a(741) = 1 + 3 + 1 = 5.
Crossrefs
Including odd-indexed parts gives A029837.
Subtracting from the odd version gives A124754.
Positions of zeros are A131577.
The odd-indexed version is A209281(n+1).
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A345197 counts compositions by sum, length, and alternating sum.
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; Table[Total[Last/@Partition[Append[stc[n],0],2]],{n,0,100}]
Comments