A124760 Number of rises for compositions in standard order.
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 1, 2
Offset: 0
Examples
Composition number 11 is 2,1,1; 2>=1>=1, so a(11) = 0. The table starts: 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 0
Links
- Antti Karttunen, Table of n, a(n) for n = 0..16383
Crossrefs
Cf. A066099, A124761, A124762, A124763, A124764, A011782 (row lengths), A045883 (row sums), A233249, A333213, A333380.
Compositions of n with k strict ascents are A238343.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Weakly decreasing compositions are A114994.
- Weakly decreasing runs are counted by A124765.
- Weakly increasing runs are counted by A124766.
- Equal runs are counted by A124767.
- Strictly increasing runs are counted by A124768.
- Strictly decreasing runs are counted by A124769.
- Weakly increasing compositions are A225620.
- Reverse is A228351 (triangle).
- Strict compositions are A233564.
- Constant compositions are A272919.
- Normal compositions are A333217.
- Strictly decreasing compositions are A333255.
- Strictly increasing compositions are A333256.
- Anti-runs are counted by A333381.
- Adjacent unequal pairs are counted by A333382.
- Anti-runs are A333489.
- Runs-resistance is A333628.
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; Table[Length[Select[Partition[stc[n],2,1],Less@@#&]],{n,0,100}] (* Gus Wiseman, Apr 08 2020 *)
-
PARI
A066099row(n) = {my(v=vector(n), j=0, k=0); while(n>0, k++; if(n%2==1, v[j++]=k; k=0); n\=2); vector(j, i, v[j-i+1]); } \\ Returns empty for n=0. - From code of Franklin T. Adams-Watters in A066099. A124760(n) = { my(v=A066099row(n), r=0); for(i=2,length(v),r += (v[i]>v[i-1])); (r); }; \\ Antti Karttunen, Jul 09 2017
Formula
For a composition b(1),...,b(k), a(n) = Sum_{i = 1 .. k-1} [b(i+1) > b(i)], where [ ] is Iverson bracket, giving in this case 1 only if b(i+1) > b(i), and 0 otherwise. - Formula clarified by Antti Karttunen, Jul 10 2017
For n > 0, a(n) = A124765(n) - 1. - Gus Wiseman, Apr 08 2020
Comments