OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..960
FORMULA
a(n) ~ c * ((11+5*sqrt(5))/2)^n / n^(3/2), where c = 0.01403940208697420741365874329992235342402687... . - Vaclav Kotesovec, Sep 07 2014
EXAMPLE
a(0) = 1: the empty path.
a(1) = 1: HS.
a(2) = 3: HSHS, HHSS, HSDSS.
a(3) = 14: HSHSHS, HHSSHS, HSDSSHS, HSHHSS, HHSHSS, HSDSHSS, HHHSSS, HSDHSSS, HSHDSSS, HHSDSSS, HSDSDSSS, HSHSDSS, HHSSDSS, HSDSSDSS.
MAPLE
b:= proc(x, y) option remember; `if`(y>x, 0, `if`(x=0, 1,
b(x-1, y)+`if`(y>0, b(x, y-1), 0)+b(x-1, y+1)))
end:
a:= n-> b(n, n):
seq(a(n), n=0..25);
MATHEMATICA
b[x_, y_] := b[x, y] = If[y > x, 0, If[x == 0, 1, b[x - 1, y] + If[y > 0, b[x, y - 1], 0] + b[x - 1, y + 1]]];
a[n_] := b[n, n];
a /@ Range[0, 25] (* Jean-François Alcover, Dec 18 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 25 2013
STATUS
approved