A374741 Sum of leaders of weakly decreasing runs in the n-th composition in standard order.
0, 1, 2, 1, 3, 2, 3, 1, 4, 3, 2, 2, 4, 3, 3, 1, 5, 4, 3, 3, 5, 2, 4, 2, 5, 4, 3, 3, 4, 3, 3, 1, 6, 5, 4, 4, 3, 3, 5, 3, 6, 5, 2, 2, 5, 4, 4, 2, 6, 5, 4, 4, 6, 3, 5, 3, 5, 4, 3, 3, 4, 3, 3, 1, 7, 6, 5, 5, 4, 4, 6, 4, 7, 3, 3, 3, 6, 5, 5, 3, 7, 6, 5, 5, 5, 2, 4
Offset: 0
Keywords
Examples
The maximal weakly decreasing subsequences of the 1234567th composition in standard order are ((3,2,1),(2,2,1),(2),(5,1,1,1)), so a(1234567) is 3+2+2+5 = 12.
Links
Crossrefs
For length instead of sum we have A124765.
The opposite is A374630.
A373949 counts compositions by run-compressed sum.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Parts are listed by A066099.
- Constant compositions are ranked by A272919.
- Run-length transform is A333627.
- Run-compression transform is A373948.
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; Table[Total[First/@Split[stc[n],GreaterEqual]],{n,0,100}]
Comments