login
Number of compositions of n whose run-lengths cover an initial interval of positive integers.
19

%I #10 Jul 06 2020 19:28:22

%S 1,1,1,3,6,13,21,48,89,180,355,707,1382,2758,5448,10786,21391,42476,

%T 84291,167516,333036,662153,1317687,2622706,5221951,10400350,20720877,

%U 41288823,82294979,164052035,327088649,652238016,1300788712,2594486045,5175378128,10324522020

%N Number of compositions of n whose run-lengths cover an initial interval of positive integers.

%C A composition of n is a finite sequence of positive integers with sum n.

%e The a(0) = 1 through a(5) = 13 compositions:

%e () (1) (2) (3) (4) (5)

%e (1,2) (1,3) (1,4)

%e (2,1) (3,1) (2,3)

%e (1,1,2) (3,2)

%e (1,2,1) (4,1)

%e (2,1,1) (1,1,3)

%e (1,2,2)

%e (1,3,1)

%e (2,1,2)

%e (2,2,1)

%e (3,1,1)

%e (1,1,2,1)

%e (1,2,1,1)

%t normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];

%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[Length/@Split[#]]&]],{n,0,10}]

%Y Looking at multiplicities instead of run-lengths gives A329741.

%Y The complete case is A329749.

%Y Complete compositions are A107429.

%Y Cf. A000740, A008965, A242882, A244164, A274174, A329738, A329739, A329740, A329744, A329748.

%K nonn

%O 0,4

%A _Gus Wiseman_, Nov 20 2019

%E a(21)-a(26) from _Giovanni Resta_, Nov 22 2019

%E a(27)-a(35) from _Alois P. Heinz_, Jul 06 2020