OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
a(n) ~ c * 5^n / n^(3/2), where c = 0.027245791342943908483296328462... . - _Vaclav Kotesovec_, Aug 28 2014
EXAMPLE
a(0) = 1: the empty path.
a(1) = 1: H.
a(2) = 2: HH, ud.
a(3) = 4: HHH, udH, Hud, uHd.
a(4) = 12: HHHH, udHH, HudH, uHdH, HHud, udud, HuHd, uHHd, uudd, HHUD, udUD, uuuD.
a(5) = 34: HHHHH, udHHH, HudHH, uHdHH, HHudH, ududH, HuHdH, uHHdH, uuddH, HHUDH, udUDH, uuuDH, HHHud, udHud, Hudud, uHdud, HHuHd, uduHd, HuHHd, uHHHd, uudHd, Huudd, uHudd, uuHdd, HHHUD, udHUD, HudUD, uHdUD, HuuuD, uHuuD, uuHuD, HHUHD, udUHD, uuuHD.
MAPLE
b:= proc(x, y) option remember; `if`(y<0 or x<y, 0,
`if`(x=0, 1, add(b(x-1, y+j), j=[-1, -3, 0, 1, 3])))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..30);
MATHEMATICA
b[x_, y_] := b[x, y] = If[y<0 || x<y, 0, If[x==0, 1, Sum[b[x-1, y+j], {j, {-1, -3, 0, 1, 3}}]]];
a[n_] := b[n, 0];
a /@ Range[0, 30] (* _Jean-François Alcover_, Dec 20 2020, after _Alois P. Heinz_ *)
CROSSREFS
KEYWORD
nonn
AUTHOR
_Alois P. Heinz_, Apr 14 2014
STATUS
approved