login
A346633
Sum of even-indexed parts (even bisection) of the n-th composition in standard order.
14
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,7
COMMENTS
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
FORMULA
a(n) = (A029837(n) - A124754(n))/2.
a(n) = A029837(n) - A209281(n + 1).
a(n) = A124754(n) + A209281(n + 1).
EXAMPLE
Composition number 741 in standard order is (2,1,1,3,2,1), so a(741) = 1 + 3 + 1 = 5.
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}]
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).
The version for prime indices is A346698 (reverse: A346700).
A000120 and A080791 count binary digits 1 and 0, with difference A145037.
A011782 counts compositions.
A056239 adds up prime indices, row sums of A112798.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A345197 counts compositions by sum, length, and alternating sum.
Sequence in context: A376615 A335511 A345221 * A080940 A080941 A346705
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 01 2021
STATUS
approved