login
A383765
Number of compositions of n such that between any pair of equal adjacent parts there can be a pair of brackets enclosing a new nonempty composition with the same rules.
0
1, 1, 2, 5, 12, 32, 87, 247, 719, 2143, 6501, 20020, 62413, 196602, 624777, 2000583, 6448418, 20905700, 68124244, 223008863, 733029865, 2418389200, 8005456180, 26581030889, 88505553642, 295449465970, 988604513361, 3315211853122, 11139876837837, 37503193583796
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