OFFSET
0,4
COMMENTS
a(n) = A166288(n,0).
LINKS
Andrei Asinowski, Cyril Banderier, Valerie Roitner, Generating functions for lattice paths with several forbidden patterns, (2019).
FORMULA
G.f.: G(z) satisfies z^3*G^2 - (1-z)(1+z)^2*G + (1+z)^2*G = 0.
D-finite with recurrence +(n+3)*a(n) +(n+1)*a(n-1) -2*n*a(n-2) +2*(-3*n+5)*a(n-3) +(-3*n+11)*a(n-4) +(n-5)*a(n-5)=0. - R. J. Mathar, Jul 22 2022
EXAMPLE
a(5)=4 because we have UDUUDDUUDD, UUDDUDUUDD, UUDDUUDDUD, and UUDUUDDUDD.
MAPLE
F := RootOf(z^3*G^2-(1-z)*(1+z)^2*G+(1+z)^2, G): Fser := series(F, z = 0, 40): seq(coeff(Fser, z, n), n = 0 .. 36);
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Oct 12 2009
STATUS
approved