login
A387637
Number of compositions of n such that within in each maximal run of k's, up to k parts within that run can be marked.
2
1, 2, 5, 14, 39, 108, 298, 824, 2278, 6298, 17412, 48138, 133085, 367934, 1017212, 2812240, 7774875, 21494854, 59425870, 164292072, 454211016, 1255737086, 3471680722, 9598001976, 26535171097, 73360612640, 202816837599, 560718730852, 1550194248403, 4285753401052
OFFSET
0,2
LINKS
FORMULA
G.f.: 1/(1 - Sum_{j>0} b(j,x)/(1 + b(j,x))) where b(j,x) = x^j/(1-x^j) + Sum_{i=1..j} x^(j*i)/(1 - x^j)^(i+1).
EXAMPLE
In the marked composition (1',3,3,3',3,3',1,1) of n = 18 up to 3 3's in the maximal run of 3's can be marked and a single 1 can be marked in each maximal run of 1's.
a(3) = 14 counts: (1,1,1), (1',1,1), (1,1',1), (1,1,1'), (1,2), (1',2), (1,2'), (1',2'), (2,1), (2',1), (2,1'), (2',1'), (3), (3').
PROG
(PARI)
b(f) = {x^f/(1-x^f) + sum(i=1, f, x^(f*i)/(1 - x^f)^(i+1) )}
A_x(N) = {Vec( 1/( 1- sum(j=1, N, b(j)/(1+b(j)))) + O('x^(N+1)))}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
John Tyler Rascoe, Nov 18 2025
STATUS
approved