A374742 Number of integer compositions of n whose leaders of weakly decreasing runs are identical.
1, 1, 2, 3, 5, 8, 13, 21, 34, 54, 87, 138, 220, 349, 556, 881, 1403, 2229, 3551, 5653, 9019, 14387, 22988, 36739, 58785, 94100, 150765, 241658, 387617, 622002, 998658, 1604032, 2577512, 4143243, 6662520, 10716931, 17243904, 27753518, 44680121, 71947123, 115880662
Offset: 0
Keywords
Examples
The composition (3,1,3,2,1,3,3) has maximal weakly decreasing subsequences ((3,1),(3,2,1),(3,3)), with leaders (3,3,3), so is counted under a(16). The a(0) = 1 through a(6) = 13 compositions: () (1) (2) (3) (4) (5) (6) (11) (21) (22) (32) (33) (111) (31) (41) (42) (211) (212) (51) (1111) (221) (222) (311) (321) (2111) (411) (11111) (2112) (2121) (2211) (3111) (21111) (111111)
Links
- John Tyler Rascoe, Table of n, a(n) for n = 0..200
- Gus Wiseman, Sequences counting and ranking compositions by their leaders (for six types of runs).
Crossrefs
Types of runs (instead of weakly decreasing):
Types of run-leaders (instead of identical):
- For strictly decreasing leaders we have A374746.
- For weakly decreasing leaders we have A374747.
- For weakly increasing leaders we appear to have A188900.
A011782 counts compositions.
A335456 counts patterns matched by compositions.
A374748 counts compositions by sum of leaders of weakly decreasing runs.
Programs
-
Mathematica
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],SameQ@@First/@Split[#,GreaterEqual]&]],{n,0,15}]
-
PARI
B(i) = x^i/(1-x^i) * sum(j=1,i-1, x^j*prod(k=1,j, (1-x^k)^(-1))) A_x(N) = {my(x='x+O('x^N)); Vec(1+sum(i=1,N,-1+(1+x^i/(1-x^i))/(1-B(i))))} A_x(30) \\ John Tyler Rascoe, Apr 29 2025
Formula
G.f.: 1 + Sum_{i>0} -1 + (1 + x^i/(1 - x^i))/(1 - B(i,x)) where B(i,x) = x^i/(1 - x^i) * Sum_{j=1..i-1} x^j * Product_{k=1..j} (1 - x^k)^(-1). - John Tyler Rascoe, Apr 29 2025
Extensions
a(24)-a(40) from Alois P. Heinz, Jul 26 2024
Comments