OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
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
