OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..890
FORMULA
a(n) ~ c * d^n / n^(3/2), where d = 1/6*(19009+153*sqrt(17))^(1/3) + 356/(3*(19009+153*sqrt(17))^(1/3)) + 14/3 = 13.56165398271839628518..., c = 0.03237684690282108810066870410351693504744294274892020985727414558915214336... - Vaclav Kotesovec, Sep 07 2014, updated Sep 13 2021
EXAMPLE
a(0) = 1: the empty path.
a(1) = 2: U, HS.
a(2) = 8: UU, HSU, UHS, HSHS, HUS, HHSS, UDSS, HSDSS.
MAPLE
b:= proc(x, y) option remember; `if`(y>x, 0, `if`(x=0, 1,
b(x-1, y)+`if`(y>0, b(x-1, y-1)+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 - 1, y - 1] + b[x, y - 1], 0] + b[x - 1, y + 1]]];
a[n_] := b[n, n];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Mar 29 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 25 2013
STATUS
approved