OFFSET
0,2
COMMENTS
The Motzkin step set is U=(1,1), H=(1,0) and D=(1,-1). A meander is a path starting at (0,0) and never crossing the x-axis, i.e. staying at nonnegative altitude.
FORMULA
G.f.: (1/2)*(1-t^3-3*t^2-sqrt(t^6+2*t^5-3*t^4-6*t^3-2*t^2+1))*(t+1)/((t^2+2*t-1)*t^2).
EXAMPLE
a(3)=6 since we have 6 meanders of length 3, namely UHU, UDU, UHD, UDH, HUH and HUD.
PROG
(PARI) my(t='t+O('t^40)); Vec((1/2)*(1-t^3-3*t^2-sqrt(t^6+2*t^5-3*t^4-6*t^3-2*t^2+1))*(t+1)/((t^2+2*t-1)*t^2)) \\ Michel Marcus, Nov 25 2019
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Valerie Roitner, Nov 25 2019
STATUS
approved