Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #7 Apr 09 2020 00:55:18
%S 0,0,0,1,0,0,1,2,0,0,1,1,1,1,2,3,0,0,0,1,1,1,1,2,1,1,2,2,2,2,3,4,0,0,
%T 0,1,1,0,1,2,1,1,2,2,1,1,2,3,1,1,1,2,2,2,2,3,2,2,3,3,3,3,4,5,0,0,0,1,
%U 0,0,1,2,1,1,1,1,1,1,2,3,1,1,1,2,2,2,2,3,1,1,2,2,2,2,3,4,1,1,1,2,2,1,2,3,2
%N Number of non-falls (levels or rises) for compositions in standard order.
%C The standard order of compositions is given by A066099.
%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. a(n) is one fewer than the number of maximal strictly decreasing runs in this composition. Alternatively, a(n) is the number of weak ascents in the same composition. For example, the strictly decreasing runs of the 1234567th composition are ((3,2,1),(2),(2,1),(2),(5,1),(1),(1)), so a(1234567) = 7 - 1 = 6. The 6 weak ascents together with the strict descents are: 3 > 2 > 1 <= 2 <= 2 > 1 <= 2 <= 5 > 1 <= 1 <= 1. - _Gus Wiseman_, Apr 08 2020
%F a(n) = A124760(n) + A124762(n)
%F For a composition b(1),...,b(k), a(n) = Sum_{1<=i=1<k, b(i)>=b(i+1)} 1.
%F For n > 0, a(n) = A124769(n) - 1. - _Gus Wiseman_, Apr 08 2020
%e Composition number 11 is 2,1,1; 2>1<=1, so a(11) = 1.
%e The table starts:
%e 0
%e 0
%e 0 1
%e 0 0 1 2
%e 0 0 1 1 1 1 2 3
%e 0 0 0 1 1 1 1 2 1 1 2 2 2 2 3 4
%e 0 0 0 1 1 0 1 2 1 1 2 2 1 1 2 3 1 1 1 2 2 2 2 3 2 2 3 3 3 3 4 5
%t stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
%t Table[Length[Select[Partition[stc[n],2,1],LessEqual@@#&]],{n,0,100}] (* _Gus Wiseman_, Apr 08 2020 *)
%Y Cf. A066099, A124760, A124761, A124762, A124763, A011782 (row lengths), A045883 (row sums), A233249, A238343.
%Y Compositions of n with k weak ascents are A333213.
%Y Positions of zeros are A333256.
%Y All of the following pertain to compositions in standard order (A066099):
%Y - Length is A000120.
%Y - Partial sums from the right are A048793 (triangle).
%Y - Sum is A070939.
%Y - Weakly decreasing compositions are A114994.
%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 - Reversed initial intervals A164894.
%Y - Weakly increasing compositions are A225620.
%Y - Reverse is A228351 (triangle).
%Y - Strict compositions are A233564.
%Y - Constant compositions are A272919.
%Y - Normal compositions are A333217.
%Y - Permutations are A333218.
%Y - Heinz number is A333219.
%Y - Strictly decreasing compositions are A333255.
%Y - Strictly increasing compositions are A333256.
%Y - Anti-runs are A333489.
%K easy,nonn,tabf
%O 0,8
%A _Franklin T. Adams-Watters_, Nov 06 2006