A374517 Number of integer compositions of n whose leaders of anti-runs are identical.
1, 1, 2, 4, 7, 13, 25, 46, 85, 160, 301, 561, 1056, 1984, 3730, 7037, 13273, 25056, 47382, 89666, 169833, 322038, 611128, 1160660, 2206219, 4196730, 7988731, 15217557, 29005987, 55321015, 105570219, 201569648, 385059094, 735929616, 1407145439, 2691681402
Offset: 0
Keywords
Examples
The a(0) = 1 through a(5) = 13 compositions: () (1) (2) (3) (4) (5) (11) (12) (13) (14) (21) (22) (23) (111) (31) (32) (112) (41) (121) (113) (1111) (131) (212) (221) (1112) (1121) (1211) (11111)
Links
- John Tyler Rascoe, Table of n, a(n) for n = 0..100
- Gus Wiseman, Sequences counting and ranking compositions by their leaders (for six types of runs).
Crossrefs
These compositions have ranks A374519.
The complement is counted by A374640.
Other types of runs (instead of anti-):
Other types of run-leaders (instead of identical):
- For distinct leaders we have A374518.
- For weakly increasing leaders we have A374681.
- For strictly increasing leaders we have A374679.
- For weakly decreasing leaders we have A374682.
- For strictly decreasing leaders we have A374680.
A106356 counts compositions by number of maximal anti-runs.
A238279 counts compositions by number of maximal runs
A238424 counts partitions whose first differences are an anti-run.
Programs
-
Mathematica
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],SameQ@@First/@Split[#,UnsameQ]&]],{n,0,15}]
-
PARI
C_x(N) = {my(g =1/(1 - sum(k=1, N, x^k/(1+x^k))));g} A_x(i,N) = {my(x='x+O('x^N), f=(x^i)*(C_x(N)*(x^i)+x^i+1)/(1+x^i)^2);f} B_x(i,j,N) = {my(x='x+O('x^N), f=C_x(N)*x^(i+j)/((1+x^i)*(1+x^j)));f} D_x(N) = {my(x='x+O('x^N), f=1+sum(i=1,N,-1+sum(j=0,N-i, A_x(i,N)^j)*(1-B_x(i,i,N)+sum(k=1,N-i,B_x(i,k,N)))));Vec(f)} D_x(30) \\ John Tyler Rascoe, Aug 16 2024
Formula
G.f.: 1 + Sum_{i>0} (-1 + Sum_{j>=0} (A(i,x)^j)*(1 + Sum_{k>0, k<>i} (B(i,k,x)))) where A(i,x) = (x^i)*(C(x)*(x^i) + x^i + 1)/(1+x^i)^2, B(i,k,x) = C(x)*x^(i+k)/((1+x^i)*(1+x^k)), and C(x) is the g.f. for A003242. - John Tyler Rascoe, Aug 16 2024
Extensions
a(26) onwards from John Tyler Rascoe, Aug 16 2024
Comments