login
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.
31

%I #6 Mar 31 2020 10:54:22

%S 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,

%T 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,

%U 2,2,3,2,3,3,4,2,2,3,3,2,2,2,4,3,3,4

%N 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.

%C A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of 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.

%C For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton.

%H Claude Lenormand, <a href="/A318921/a318921.pdf">Deux transformations sur les mots</a>, Preprint, 5 pages, Nov 17 2003.

%e 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.

%t stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;

%t runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;

%t Table[runsres[stc[n]],{n,100}]

%Y Number of times applying A333627 to reach a power of 2, starting with n.

%Y Positions of first appearances are A333629.

%Y All of the following pertain to compositions in standard order (A066099):

%Y - The length is A000120.

%Y - The partial sums from the right are A048793.

%Y - The sum is A070939.

%Y - Adjacent equal pairs are counted by A124762.

%Y - Equal runs are counted by A124767.

%Y - Strict compositions are ranked by A233564.

%Y - The partial sums from the left are A272020.

%Y - Constant compositions are ranked by A272919.

%Y - Normal compositions are ranked by A333217.

%Y - Heinz number is A333219.

%Y - Anti-runs are counted by A333381.

%Y - Adjacent unequal pairs are counted by A333382.

%Y - First appearances for specified run-lengths are A333630.

%Y Cf. A029931, A098504, A114994, A225620, A228351, A238279, A242882, A318928, A329744, A329747, A333489.

%K nonn

%O 1,5

%A _Gus Wiseman_, Mar 31 2020