A373948 Run-compression encoded as a transformation of compositions in standard order.
0, 1, 2, 1, 4, 5, 6, 1, 8, 9, 2, 5, 12, 13, 6, 1, 16, 17, 18, 9, 20, 5, 22, 5, 24, 25, 6, 13, 12, 13, 6, 1, 32, 33, 34, 17, 4, 37, 38, 9, 40, 41, 2, 5, 44, 45, 22, 5, 48, 49, 50, 25, 52, 13, 54, 13, 24, 25, 6, 13, 12, 13, 6, 1, 64, 65, 66, 33, 68, 69, 70, 17, 72
Offset: 0
Keywords
Examples
The standard compositions and their compressions begin: 0: () --> 0: () 1: (1) --> 1: (1) 2: (2) --> 2: (2) 3: (1,1) --> 1: (1) 4: (3) --> 4: (3) 5: (2,1) --> 5: (2,1) 6: (1,2) --> 6: (1,2) 7: (1,1,1) --> 1: (1) 8: (4) --> 8: (4) 9: (3,1) --> 9: (3,1) 10: (2,2) --> 2: (2) 11: (2,1,1) --> 5: (2,1) 12: (1,3) --> 12: (1,3) 13: (1,2,1) --> 13: (1,2,1) 14: (1,1,2) --> 6: (1,2) 15: (1,1,1,1) --> 1: (1)
Links
Crossrefs
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2; Table[stcinv[First/@Split[stc[n]]],{n,0,30}]
Comments