|
|
A353855
|
|
Last term of the trajectory of the composition run-sum transformation (condensation) of the n-th composition in standard order.
|
|
7
|
|
|
0, 1, 2, 2, 4, 5, 6, 4, 8, 9, 8, 8, 12, 13, 8, 8, 16, 17, 18, 18, 20, 17, 22, 20, 24, 25, 24, 24, 20, 17, 18, 16, 32, 33, 34, 34, 32, 37, 38, 32, 40, 41, 32, 34, 44, 45, 32, 40, 48, 49, 50, 50, 52, 49, 54, 52, 40, 41, 40, 32, 32, 37, 34, 32, 64, 65, 66, 66, 68
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4). The run-sum trajectory is obtained by repeatedly taking the run-sum transformation (A353847) until the rank of an anti-run is reached. For example, the trajectory 11 -> 10 -> 8, corresponding to (2,1,1) -> (2,2) -> (4), has last term a(11) = 8.
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 trajectory 139 -> 138 -> 136 -> 128 ends with a(139) = 128.
|
|
MATHEMATICA
|
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[Total[2^Accumulate[Reverse[FixedPoint[Total/@Split[#]&, stc[n]]]]/2], {n, 0, 100}]
|
|
CROSSREFS
|
The version for partitions is A353842.
A005811 counts runs in binary expansion.
A066099 lists compositions in standard order.
A318928 gives runs-resistance of binary expansion.
A333627 ranks the run-lengths of standard compositions.
A351014 counts distinct runs in standard compositions, firsts A351015.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|