login
A359042
Sum of partial sums of the n-th composition in standard order (A066099).
19
0, 1, 2, 3, 3, 5, 4, 6, 4, 7, 6, 9, 5, 8, 7, 10, 5, 9, 8, 12, 7, 11, 10, 14, 6, 10, 9, 13, 8, 12, 11, 15, 6, 11, 10, 15, 9, 14, 13, 18, 8, 13, 12, 17, 11, 16, 15, 20, 7, 12, 11, 16, 10, 15, 14, 19, 9, 14, 13, 18, 12, 17, 16, 21, 7, 13, 12, 18, 11, 17, 16, 22
OFFSET
0,3
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.
EXAMPLE
The 29th composition in standard order is (1,1,2,1), with partial sums (1,2,4,5), with sum 12, so a(29) = 12.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[Total[Accumulate[stc[n]]], {n, 0, 100}]
CROSSREFS
See link for sequences related to standard compositions.
Each n appears A000009(n) times.
The reverse version is A029931.
Comps counted by this statistic are A053632, ptns A264034, rev ptns A358194.
This is the sum of partial sums of rows of A066099.
The version for Heinz numbers of partitions is A318283, row sums of A358136.
Row sums of A358134.
A011782 counts compositions.
A065120 gives first part of standard compositions, last A001511.
A242628 lists adjusted partial sums, ranked by A253565, row sums A359043.
A358135 gives last minus first of standard compositions.
Sequence in context: A271709 A369172 A373815 * A159070 A373812 A088241
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 20 2022
STATUS
approved