A373953 Sum of run-compression of the n-th integer composition in standard order.
0, 1, 2, 1, 3, 3, 3, 1, 4, 4, 2, 3, 4, 4, 3, 1, 5, 5, 5, 4, 5, 3, 5, 3, 5, 5, 3, 4, 4, 4, 3, 1, 6, 6, 6, 5, 3, 6, 6, 4, 6, 6, 2, 3, 6, 6, 5, 3, 6, 6, 6, 5, 6, 4, 6, 4, 5, 5, 3, 4, 4, 4, 3, 1, 7, 7, 7, 6, 7, 7, 7, 5, 7, 4, 5, 6, 7, 7, 6, 4, 7, 7, 7, 6, 5, 3, 5
Offset: 0
Keywords
Examples
The standard compositions and their compressions and compression sums begin: 0: () --> () --> 0 1: (1) --> (1) --> 1 2: (2) --> (2) --> 2 3: (1,1) --> (1) --> 1 4: (3) --> (3) --> 3 5: (2,1) --> (2,1) --> 3 6: (1,2) --> (1,2) --> 3 7: (1,1,1) --> (1) --> 1 8: (4) --> (4) --> 4 9: (3,1) --> (3,1) --> 4 10: (2,2) --> (2) --> 2 11: (2,1,1) --> (2,1) --> 3 12: (1,3) --> (1,3) --> 4 13: (1,2,1) --> (1,2,1) --> 4 14: (1,1,2) --> (1,2) --> 3 15: (1,1,1,1) --> (1) --> 1
Links
Crossrefs
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; Table[Total[First/@Split[stc[n]]],{n,0,100}]
Comments