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.

A354912 Numbers k such that the k-th composition in standard order is the sequence of run-sums of some other composition.

This page as a plain text file.
%I A354912 #7 Jun 22 2022 09:27:31
%S A354912 0,1,2,4,5,6,8,9,10,12,13,16,17,18,20,21,22,24,25,26,32,33,34,36,37,
%T A354912 38,40,41,42,44,45,48,49,50,52,54,64,65,66,68,69,70,72,73,74,76,77,80,
%U A354912 81,82,84,85,86,88,89,90,96,97,98,100,101,102,104,105,106,108
%N A354912 Numbers k such that the k-th composition in standard order is the sequence of run-sums of some other composition.
%C A354912 The k-th composition in standard order (graded reverse-lexicographic, 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.
%C A354912 Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4).
%e A354912 The terms and their corresponding compositions begin:
%e A354912    0: ()
%e A354912    1: (1)
%e A354912    2: (2)
%e A354912    4: (3)
%e A354912    5: (2,1)
%e A354912    6: (1,2)
%e A354912    8: (4)
%e A354912    9: (3,1)
%e A354912   10: (2,2)
%e A354912   12: (1,3)
%e A354912   13: (1,2,1)
%e A354912   16: (5)
%e A354912   17: (4,1)
%e A354912   18: (3,2)
%e A354912   20: (2,3)
%e A354912   21: (2,2,1)
%e A354912   22: (2,1,2)
%e A354912 For example, the 21st composition in standard order (2,2,1) equals the run-sums of (1,1,2,1), so 21 is in the sequence. On the other hand, no composition has run-sums equal to the 29th composition (1,1,2,1), so 29 is not in the sequence.
%t A354912 stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
%t A354912 Select[Range[0,100],MemberQ[Total/@Split[#]&/@ Join@@Permutations/@IntegerPartitions[Total[stc[#]]],stc[#]]&]
%Y A354912 The standard compositions used here are A066099, run-sums A353847/A353932.
%Y A354912 These are the positions of nonzero terms in A354578.
%Y A354912 The complement is A354904, counted by A354909.
%Y A354912 These compositions are counted by A354910.
%Y A354912 A003242 counts anti-run compositions, ranked by A333489.
%Y A354912 A124767 counts runs in standard compositions.
%Y A354912 A238279 and A333755 count compositions by number of runs.
%Y A354912 A351014 counts distinct runs of standard compositions, firsts A351015.
%Y A354912 A353852 ranks compositions with all distinct run-sums, counted by A353850.
%Y A354912 A353853-A353859 pertain to composition run-sum trajectory.
%Y A354912 Cf. A000120, A029837, A124771, A239312, A333381, A334299, A351597, A353832, A353849, A353860, A354905.
%K A354912 nonn
%O A354912 0,3
%A A354912 _Gus Wiseman_, Jun 22 2022