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.

A354582 Number of distinct contiguous constant subsequences (or partial runs) in the k-th composition in standard order.

This page as a plain text file.
%I A354582 #6 Jun 17 2022 08:35:11
%S A354582 0,1,1,2,1,2,2,3,1,2,2,3,2,2,3,4,1,2,2,3,2,3,2,4,2,2,3,3,3,3,4,5,1,2,
%T A354582 2,3,2,3,3,4,2,3,3,4,3,2,3,5,2,2,3,3,3,3,2,4,3,3,4,3,4,4,5,6,1,2,2,3,
%U A354582 2,3,3,4,2,3,3,4,2,3,4,5,2,3,2,4,3,4,3
%N A354582 Number of distinct contiguous constant subsequences (or partial runs) in the k-th composition in standard order.
%C A354582 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.
%e A354582 Composition number 981 in standard order is (1,1,1,2,2,2,1), with partial runs (1), (2), (1,1), (2,2), (1,1,1), (2,2,2), so a(981) = 6.
%e A354582 As a triangle:
%e A354582   1
%e A354582   1 2
%e A354582   1 2 2 3
%e A354582   1 2 2 3 2 2 3 4
%e A354582   1 2 2 3 2 3 2 4 2 2 3 3 3 3 4 5
%e A354582   1 2 2 3 2 3 3 4 2 3 3 4 3 2 3 5 2 2 3 3 3 3 2 4 3 3 4 3 4 4 5 6
%t A354582 stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
%t A354582 pre[y_]:=NestWhileList[Most,y,Length[#]>1&];
%t A354582 Table[Length[Union[Join@@pre/@Split[stc[n]]]],{n,0,100}]
%Y A354582 The version for partitions is A001222, full A001221.
%Y A354582 If we allow any constant subsequence we get A063787.
%Y A354582 If we allow any contiguous subsequence we get A124771.
%Y A354582 Positions of first appearances are A126646.
%Y A354582 The version for binary indices is A330036, full A005811.
%Y A354582 If we allow any subsequence we get A334299.
%Y A354582 The full version is A351014, firsts A351015.
%Y A354582 The version for run-sums of partitions is A353861, full A353835.
%Y A354582 Counting distinct sums of partial runs gives A354907, full A353849.
%Y A354582 A066099 lists all compositions in standard order.
%Y A354582 A124767 counts runs in standard compositions.
%Y A354582 A238279 and A333755 count compositions by number of runs.
%Y A354582 A353852 ranks compositions with all distinct run-sums, counted by A353850.
%Y A354582 A353853-A353859 pertain to composition run-sum trajectory.
%Y A354582 A353932 lists run-sums of standard compositions, rows ranked by A353847.
%Y A354582 Cf. A000120, A003242, A029837, A175413, A274174, A333381, A333489, A353832, A353860, A353864.
%K A354582 nonn,tabf
%O A354582 0,4
%A A354582 _Gus Wiseman_, Jun 13 2022