|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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.
|
|
LINKS
|
|
|
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.
This is the sum of partial sums of rows of A066099.
The version for Heinz numbers of partitions is A318283, row sums of A358136.
A358135 gives last minus first of standard compositions.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|