OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: sqrt(x^2-6*x+1)/(4*(x-1)^2)+1/(4*sqrt(x^2-6*x+1))-1/(2*(x-1)). - Vaclav Kotesovec, Jun 27 2013
a(n) ~ sqrt(8+6*sqrt(2))*(3+2*sqrt(2))^n/(16*sqrt(Pi*n)). - Vaclav Kotesovec, Jun 27 2013
EXAMPLE
a(0) = 1: the empty path.
a(1) = 1: U.
a(2) = 2: HSSH, UU.
a(3) = 10: HHSSSH, HSHSSH, HSSHSH, HSSHU, HSSSHH, HSSUH, HSUSH, HUSSH, UHSSH, UUU.
MAPLE
a:= proc(n) option remember; `if`(n<4, [1, 1, 2, 10][n+1],
((8*n^3-35*n^2+49*n-21)*a(n-1) -(2*n-3)*(7*n^2-21*n+15)*a(n-2)
+(8*n^3-37*n^2+55*n-27)*a(n-3) -(n-3)*(n-1)^2*a(n-4))
/ (n*(n-2)^2))
end:
seq(a(n), n=0..30);
MATHEMATICA
CoefficientList[Series[Sqrt[x^2-6*x+1]/(4*(x-1)^2)+1/(4*Sqrt[x^2-6*x+1])-1/(2*(x-1)), {x, 0, 20}], x] (* Vaclav Kotesovec, Jun 27 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 26 2013
STATUS
approved