OFFSET
0,6
COMMENTS
For "secondary structure" and "stack" see the Hofacker et al. reference, p. 209.
a(n) = A202838(n,0).
LINKS
I. L. Hofacker, P. Schuster and P. F. Stadler, Combinatorics of RNA secondary structures, Discrete Appl. Math., 88, 1998, 207-237.
P. R. Stein and M. S. Waterman, On some new sequences generalizing the Catalan and Motzkin numbers, Discrete Math., 26 (1979), 261-272.
FORMULA
G.f. G=G(z) satisfies G = 1+zG +fG(G-1)/(1+f), where f = z^4/(1-z^2).
D-finite with recurrence +(n+4)*a(n) +(-2*n-5)*a(n-1) +(-n-1)*a(n-2) +2*(2*n-1)*a(n-3) +(-n+2)*a(n-4) +4*(-2*n+7)*a(n-5) +3*(n-5)*a(n-6) +3*(2*n-13)*a(n-7) +2*(-n+8)*a(n-8) +2*(-2*n+19)*a(n-9) +(n-11)*a(n-10)=0. - R. J. Mathar, Jul 26 2022
EXAMPLE
a(5)=2; representing unpaired vertices by v and arcs by AA, BB, etc., the 8 (= A004148(5)) secondary structures of size 5 are vvvvv, AvAvv, vvAvA, AvvAv, vAvvA, AvvvA, vAvAv, ABvBA; they have 0,1,1,1,1,1,1,0 stacks of length 1, respectively.
MAPLE
f := z^4/(1-z^2): eq := G = 1+z*G+f*G*(G-1)/(1+f): G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 42)): seq(coeff(Gser, z, n), n = 0 .. 39);
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Dec 25 2011
STATUS
approved