%I #7 Mar 25 2020 06:52:54
%S 0,0,0,0,0,1,1,0,0,1,0,1,1,2,1,0,0,1,1,1,1,1,2,1,1,2,1,2,1,2,1,0,0,1,
%T 1,1,0,2,2,1,1,2,0,1,2,3,2,1,1,2,2,2,2,2,3,2,1,2,1,2,1,2,1,0,0,1,1,1,
%U 1,2,2,1,1,1,1,2,2,3,2,1,1,2,2,2,1,1,2
%N Number of adjacent unequal parts in the n-th composition in standard-order.
%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 n > 0, a(n) is one fewer than the number of maximal runs of the n-th composition in standard-order.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Longest_increasing_subsequence">Longest increasing subsequence</a>
%F For n > 0, a(n) = A124767(n) - 1.
%e The 46th composition in standard order is (2,1,1,2), with maximal runs ((2),(1,1),(2)), so a(46) = 3 - 1 = 2.
%t stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
%t Table[Length[Select[Partition[stc[n],2,1],UnsameQ@@#&]],{n,0,100}]
%Y Indices of first appearances (not counting 0) are A113835.
%Y Partitions whose 0-appended first differences are a run are A007862.
%Y Partitions whose first differences are a run are A049988.
%Y A triangle counting maximal anti-runs of compositions is A106356.
%Y A triangle counting maximal runs of compositions is A238279.
%Y All of the following pertain to compositions in standard order (A066099):
%Y - Adjacent equal pairs are counted by A124762.
%Y - Weakly decreasing runs are counted by A124765.
%Y - Weakly increasing runs are counted by A124766.
%Y - Equal runs are counted by A124767.
%Y - Strictly increasing runs are counted by A124768.
%Y - Strictly decreasing runs are counted by A124769.
%Y - Strict compositions are ranked by A233564.
%Y - Constant compositions are ranked by A272919.
%Y - Normal compositions are ranked by A333217.
%Y - Anti-runs are ranked by A333489.
%Y - Anti-runs are counted by A333381.
%Y Cf. A000005, A000120, A003242, A029931, A048793, A059893, A070939, A114994, A225620, A228351, A238424.
%K nonn
%O 0,14
%A _Gus Wiseman_, Mar 24 2020
|