OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: x/((x-1)^2*sqrt(x^2-6*x+1)) - 1/(x-1).
a(n) ~ (3+2*sqrt(2))^(n+1/2)/(2^(3+1/4)*sqrt(Pi*n)). - Vaclav Kotesovec, Jun 27 2013
EXAMPLE
a(0) = 1: the empty path.
a(1) = 2: HS, U.
a(2) = 6: HHSS, HSHS, HSU, HUS, UHS, UU.
a(3) = 23: HHHSSS, HHSHSS, HHSSHS, HHSSU, HHSUS, HHUSS, HSHHSS, HSHSHS, HSHSU, HSHUS, HSSHHS, HSUHS, HSUU, HUHSS, HUSHS, HUSU, HUUS, UHHSS, UHSHS, UHSU, UHUS, UUHS, UUU.
MAPLE
a:= proc(n) option remember; `if`(n<4, [1, 2, 6, 23][n+1],
((8*n-11)*a(n-1) +(21-14*n)*a(n-2)
+(8*n-13)*a(n-3) -(n-2)*a(n-4))/ (n-1))
end:
seq(a(n), n=0..25);
MATHEMATICA
CoefficientList[Series[x/((x-1)^2*Sqrt[x^2-6*x+1]) - 1/(x-1), {x, 0, 20}], x] (* Vaclav Kotesovec, Jun 27 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 26 2013
STATUS
approved