OFFSET
0,3
COMMENTS
The weight of a bracketed composition is the sum of all parts at all levels.
FORMULA
G.f.: G(x) satisfies G(x) = 1/(1 - Sum_{k>0} x^k/(1 - x^k * (G(x) - 1))).
EXAMPLE
Starting with 222 a composition of 6, we can add a composition between the first pair of 2's giving 2(31222)2. Then again between the first inner pair of 2's, giving 2(312(1)22)2 a bracketed composition of 15.
In 3(1(3)12(5)23)3 the two rightmost 3's are not considered to be adjacent because they are on different levels. So 3(1(3)12(5)23)(1)3 is not a valid bracketed composition.
a(4) = 12 counts: 1111, 1(1)11, 11(1)1, 1(11)1, 121, 1(2)1, 112, 13, 211, 22, 31, 4.
PROG
(PARI)
G(k, N) = {if(k<2, 1/(1-sum(i=1, 1, x^i)), 1/(1-sum(j=1, N, x^j/(1-x^j * (-1 + G(k-1, N-(2*j)))))))}
C(N) = {Vec(G(ceil(N/2)+1, N)+O('x^(N+1)))}
C(20)
CROSSREFS
KEYWORD
nonn
AUTHOR
John Tyler Rascoe, May 16 2025
STATUS
approved
