cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A124760 Number of rises for compositions in standard order.

This page as a plain text file.
%I A124760 #13 Apr 09 2020 00:54:46
%S A124760 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,
%T A124760 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,
%U A124760 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
%N A124760 Number of rises for compositions in standard order.
%C A124760 The standard order of compositions is given by A066099.
%C A124760 A114994 seems to give the positions of zeros. - _Antti Karttunen_, Jul 09 2017
%C A124760 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 weakly decreasing runs in this composition. Alternatively, a(n) is the number of strict ascents in the same composition. For example, the weakly decreasing runs of the 1234567th composition are ((3,2,1),(2,2,1),(2),(5,1,1,1)), so a(1234567) = 4 - 1 = 3. The 3 strict ascents together with the weak descents are: 3 >= 2 >= 1 < 2 >= 2 >= 1 < 2 < 5 >= 1 >= 1 >= 1. - _Gus Wiseman_, Apr 08 2020
%H A124760 Antti Karttunen, <a href="/A124760/b124760.txt">Table of n, a(n) for n = 0..16383</a>
%F A124760 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
%F A124760 For n > 0, a(n) = A124765(n) - 1. - _Gus Wiseman_, Apr 08 2020
%e A124760 Composition number 11 is 2,1,1; 2>=1>=1, so a(11) = 0.
%e A124760 The table starts:
%e A124760   0
%e A124760   0
%e A124760   0 0
%e A124760   0 0 1 0
%e A124760   0 0 0 0 1 1 1 0
%e A124760   0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0
%e A124760   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
%t A124760 stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
%t A124760 Table[Length[Select[Partition[stc[n],2,1],Less@@#&]],{n,0,100}] (* _Gus Wiseman_, Apr 08 2020 *)
%o A124760 (PARI)
%o A124760 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.
%o A124760 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
%Y A124760 Cf. A066099, A124761, A124762, A124763, A124764, A011782 (row lengths), A045883 (row sums), A233249, A333213, A333380.
%Y A124760 Compositions of n with k strict ascents are A238343.
%Y A124760 All of the following pertain to compositions in standard order (A066099):
%Y A124760 - Length is A000120.
%Y A124760 - Sum is A070939.
%Y A124760 - Weakly decreasing compositions are A114994.
%Y A124760 - Weakly decreasing runs are counted by A124765.
%Y A124760 - Weakly increasing runs are counted by A124766.
%Y A124760 - Equal runs are counted by A124767.
%Y A124760 - Strictly increasing runs are counted by A124768.
%Y A124760 - Strictly decreasing runs are counted by A124769.
%Y A124760 - Weakly increasing compositions are A225620.
%Y A124760 - Reverse is A228351 (triangle).
%Y A124760 - Strict compositions are A233564.
%Y A124760 - Constant compositions are A272919.
%Y A124760 - Normal compositions are A333217.
%Y A124760 - Strictly decreasing compositions are A333255.
%Y A124760 - Strictly increasing compositions are A333256.
%Y A124760 - Anti-runs are counted by A333381.
%Y A124760 - Adjacent unequal pairs are counted by A333382.
%Y A124760 - Anti-runs are A333489.
%Y A124760 - Runs-resistance is A333628.
%K A124760 easy,nonn,tabf
%O A124760 0,53
%A A124760 _Franklin T. Adams-Watters_, Nov 06 2006