login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Maximum part of the n-th composition in standard order. a(0) = 0.
36

%I #6 Apr 06 2020 22:12:44

%S 0,1,2,1,3,2,2,1,4,3,2,2,3,2,2,1,5,4,3,3,3,2,2,2,4,3,2,2,3,2,2,1,6,5,

%T 4,4,3,3,3,3,4,3,2,2,3,2,2,2,5,4,3,3,3,2,2,2,4,3,2,2,3,2,2,1,7,6,5,5,

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

%N Maximum part of the n-th composition in standard order. a(0) = 0.

%C One plus the longest run of 0's in the binary expansion of n.

%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. This gives a bijective correspondence between nonnegative integers and integer compositions.

%F For n > 0, a(n) = A087117(n) + 1.

%e The 100th composition in standard order is (1,3,3), so a(100) = 3.

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

%t Table[If[n==0,0,Max@@stc[n]],{n,0,100}]

%Y Positions of ones are A000225.

%Y Positions of terms <= 2 are A003754.

%Y The version for prime indices is A061395.

%Y Positions of terms > 1 are A062289.

%Y Positions of first appearances are A131577.

%Y The minimum part is given by A333768.

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

%Y - Length is A000120.

%Y - Compositions without 1's are A022340.

%Y - Sum is A070939.

%Y - Product is A124758.

%Y - Runs are counted by A124767.

%Y - Strict compositions are A233564.

%Y - Constant compositions are A272919.

%Y - Runs-resistance is A333628.

%Y - Weakly decreasing compositions are A114994.

%Y - Weakly increasing compositions are A225620.

%Y - Strictly decreasing compositions are A333255.

%Y - Strictly increasing compositions are A333256.

%Y Cf. A029931, A048793, A087117, A228351, A328594, A333217, A333218, A333219, A333632, A333767.

%K nonn

%O 0,3

%A _Gus Wiseman_, Apr 05 2020