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.

A124762 Number of levels for compositions in standard order.

This page as a plain text file.
%I A124762 #7 Apr 09 2020 00:55:02
%S A124762 0,0,0,1,0,0,0,2,0,0,1,1,0,0,1,3,0,0,0,1,0,1,0,2,0,0,1,1,1,1,2,4,0,0,
%T A124762 0,1,1,0,0,2,0,0,2,2,0,0,1,3,0,0,0,1,0,1,0,2,1,1,2,2,2,2,3,5,0,0,0,1,
%U A124762 0,0,0,2,0,1,1,1,0,0,1,3,0,0,0,1,1,2,1,3,0,0,1,1,1,1,2,4,0,0,0,1,1,0,0,2,0
%N A124762 Number of levels for compositions in standard order.
%C A124762 The standard order of compositions is given by A066099.
%C A124762 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. This sequence gives the number of adjacent equal terms in the n-th composition in standard order. Alternatively, a(n) is one fewer than the number of maximal anti-runs in the same composition, where anti-runs are sequences without any adjacent equal terms. For example, the 1234567th composition in standard order is (3,2,1,2,2,1,2,5,1,1,1) with anti-runs ((3,2,1,2),(2,1,2,5,1),(1),(1)), so a(1234567) = 4 - 1 = 3. - _Gus Wiseman_, Apr 08 2020
%F A124762 For a composition b(1),...,b(k), a(n) = Sum_{1<=i=1<k, b(i)=b(i+1)} 1.
%F A124762 For n > 0, a(n) = A333381(n) - 1. - _Gus Wiseman_, Apr 08 2020
%e A124762 Composition number 11 is 2,1,1; 2>1=1, so a(11) = 1.
%e A124762 The table starts:
%e A124762   0
%e A124762   0
%e A124762   0 1
%e A124762   0 0 0 2
%e A124762   0 0 1 1 0 0 1 3
%e A124762   0 0 0 1 0 1 0 2 0 0 1 1 1 1 2 4
%e A124762   0 0 0 1 1 0 0 2 0 0 2 2 0 0 1 3 0 0 0 1 0 1 0 2 1 1 2 2 2 2 3 5
%t A124762 stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
%t A124762 Table[Length[Select[Partition[stc[n],2,1],SameQ@@#&]],{n,0,100}] (* _Gus Wiseman_, Apr 08 2020 *)
%Y A124762 Cf. A066099, A124760, A124761, A124763, A124764, A011782 (row lengths), A059570 (row sums).
%Y A124762 Anti-runs summing to n are counted by A003242(n).
%Y A124762 A triangle counting maximal anti-runs of compositions is A106356.
%Y A124762 A triangle counting maximal runs of compositions is A238279.
%Y A124762 Partitions whose first differences are an anti-run are A238424.
%Y A124762 All of the following pertain to compositions in standard order (A066099):
%Y A124762 - Weakly decreasing runs are counted by A124765.
%Y A124762 - Weakly increasing runs are counted by A124766.
%Y A124762 - Equal runs are counted by A124767.
%Y A124762 - Strictly increasing runs are counted by A124768.
%Y A124762 - Strictly decreasing runs are counted by A124769.
%Y A124762 - Strict compositions are A233564.
%Y A124762 - Constant compositions are A272919.
%Y A124762 - Normal compositions are A333217.
%Y A124762 - Adjacent unequal pairs are counted by A333382.
%Y A124762 - Anti-runs are A333489.
%Y A124762 Cf. A000120, A029931, A048793, A059893, A070939, A114994, A225620, A228351.
%K A124762 easy,nonn,tabf
%O A124762 0,8
%A A124762 _Franklin T. Adams-Watters_, Nov 06 2006