OFFSET
0,3
COMMENTS
The number of paths in the first quadrant, from (0,0) to (n,0), consisting of steps U=(1,1), D=(1,-1), h=(1,0) and H=(2,0) is A128720(n).
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: 2*(1+z+z^2)/(1-3*z^2-z^4+sqrt((1+z^2-z^4)*(1-3*z^2-z^4))).
D-finite with recurrence (n+2)*a(n) +n*a(n-1) +(-n-6)*a(n-2) -2*n*a(n-3) +7*(-n+2)*a(n-4) +5*(-n+4)*a(n-5) +3*(-n+6)*a(n-6) +2*(n-8)*a(n-7) +(3*n-26)*a(n-8) +(n-8)*a(n-9) +(n-10)*a(n-10)=0. - R. J. Mathar, Oct 08 2016
EXAMPLE
a(4)=8 because we have hhhh, hHh, HH, hUDh, UDUD, UhhD, UHD and UUDD.
MAPLE
G:=(2*(1+z+z^2))/(1-3*z^2-z^4+sqrt((1+z^2-z^4)*(1-3*z^2-z^4))): Gser:=series(G, z=0, 35): seq(coeff(Gser, z, n), n=0..30);
PROG
(PARI) seq(n) = {my(z='x); Vec(2*(1+z+z^2)/(1-3*z^2-z^4+sqrt((1+z^2-z^4)*(1-3*z^2-z^4) + O(z*z^n))))} \\ Andrew Howroyd, Nov 07 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Sep 05 2007
EXTENSIONS
More terms from Andrew Howroyd, Nov 07 2025
STATUS
approved
