OFFSET
0,3
COMMENTS
Radius of convergence of g.f. A(x) is r = 0.446171506758870... where 1-r-2*r^2-2*r^3+r^4-r^5 = 0, with A(r) = (1-r^2)/(2*r^3) = 4.5087858050...
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..2866
Andrei Asinowski, Cyril Banderier, Valerie Roitner, Generating functions for lattice paths with several forbidden patterns, (2019).
Helmut Prodinger, Motzkin paths of bounded height with two forbidden contiguous subwords of length two, arXiv:2310.12497 [math.CO], 2023.
FORMULA
G.f.: (1-x^2 - sqrt( (1-x-2*x^2-2*x^3+x^4-x^5)/(1-x) ))/(2*x^3).
EXAMPLE
G.f.: A(x) = 1 + x + 2*x^2 + 3*x^3 + 5*x^4 + 9*x^5 + 16*x^6 + 30*x^7 +...
MATHEMATICA
CoefficientList[Series[(1 - x^2 - Sqrt[(1 - x - 2*x^2 - 2*x^3 + x^4 - x^5)/(1 - x)])/(2*x^3), {x, 0, 35}], x] (* Michael De Vlieger, Oct 24 2023 *)
PROG
(PARI) {a(n)=polcoeff(exp(sum(m=1, n+1, x^m/m*sum(k=0, m, binomial(m, k)^2*x^k*(1-x)^k)+x*O(x^n))), n)}
(PARI) {a(n)=polcoeff((1-x^2 - sqrt( (1-x-2*x^2-2*x^3+x^4-x^5)/(1-x +x^4*O(x^n)) ))/(2*x^3), n)}
for(n=0, 40, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Sep 29 2012
STATUS
approved