A333628 Runs-resistance of the n-th composition in standard order. Number of steps taking run-lengths to reduce the n-th composition in standard order to a singleton.
0, 0, 1, 0, 2, 2, 1, 0, 2, 1, 3, 2, 2, 3, 1, 0, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 4, 3, 4, 3, 1, 0, 2, 2, 3, 1, 2, 2, 3, 2, 2, 1, 2, 2, 2, 3, 3, 2, 2, 2, 4, 2, 3, 2, 4, 3, 4, 2, 3, 3, 4, 3, 1, 0, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 4, 2, 2, 3, 3, 2, 2, 2, 4, 3, 3, 4
Offset: 1
Keywords
Examples
Starting with 13789 and repeatedly applying A333627 gives: 13789 -> 859 -> 110 -> 29 -> 11 -> 6 -> 3 -> 2, corresponding to the compositions: (1,2,2,1,1,2,1,1,2,1) -> (1,2,2,1,2,1,1) -> (1,2,1,1,2) -> (1,1,2,1) -> (2,1,1) -> (1,2) -> (1,1) -> (2), so a(13789) = 7.
Links
- Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003.
Crossrefs
Number of times applying A333627 to reach a power of 2, starting with n.
Positions of first appearances are A333629.
All of the following pertain to compositions in standard order (A066099):
- The length is A000120.
- The partial sums from the right are A048793.
- The sum is A070939.
- Adjacent equal pairs are counted by A124762.
- Equal runs are counted by A124767.
- Strict compositions are ranked by A233564.
- The partial sums from the left are A272020.
- Constant compositions are ranked by A272919.
- Normal compositions are ranked by A333217.
- Heinz number is A333219.
- Anti-runs are counted by A333381.
- Adjacent unequal pairs are counted by A333382.
- First appearances for specified run-lengths are A333630.
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1; Table[runsres[stc[n]],{n,100}]
Comments