OFFSET
0,3
COMMENTS
The leaders of anti-runs in a sequence are obtained by splitting it into maximal consecutive anti-runs (sequences with no adjacent equal terms) and taking the first term of each.
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 0..100
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
EXAMPLE
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)
MATHEMATICA
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n], SameQ@@First/@Split[#, UnsameQ]&]], {n, 0, 15}]
PROG
(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
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 01 2024
EXTENSIONS
a(26) onwards from John Tyler Rascoe, Aug 16 2024
STATUS
approved