cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A359042 Sum of partial sums of the n-th composition in standard order (A066099).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 20 2022

Keywords

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.

Examples

			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.
		

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.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Total[Accumulate[stc[n]]],{n,0,100}]