OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = Sum_{k=0..n-1} k*A166293(n,k).
G.f.: G=z[z - 1 + (1 - z + z^2)g(z)]/[(1 - z - z^2)(1 - z - z^2 - 2z^3*g(z)], where g=g(z) satisfies g = 1 + zg + z^2*g + z^3*g^2.
a(n) ~ sqrt(55 + 123/sqrt(5)) * (3+sqrt(5))^n / (sqrt(Pi*n) * 2^(n+5/2)). - Vaclav Kotesovec, Mar 20 2014
Equivalently, a(n) ~ phi^(2*n + 5) / (4 * 5^(1/4) * sqrt(Pi*n)), where phi = A001622 is the golden ratio. - Vaclav Kotesovec, Dec 07 2021
EXAMPLE
a(3)=4 because the paths UDUDUD, UDU(UD)D, U(UD)DUD, and U(UD)(UD)D have 0 + 1 + 1 + 2 = 4 peaks at even level (shown between parentheses).
MAPLE
g := ((1-z-z^2-sqrt(1-2*z-z^2-2*z^3+z^4))*1/2)/z^3: G := z*(z-1+(1-z+z^2)*g)/((1-z-z^2)*(1-z-z^2-2*z^3*g)): Gser := series(G, z = 0, 35): seq(coeff(Gser, z, n), n = 1 .. 30);
MATHEMATICA
Rest[CoefficientList[Series[x*(x-1+(1-x+x^2)*((1-x-x^2-Sqrt[1-2*x-x^2-2*x^3+x^4])*1/2)/x^3)/((1-x-x^2)*(1-x-x^2-2*x^3*((1-x-x^2-Sqrt[1-2*x-x^2-2*x^3+x^4])*1/2)/x^3)), {x, 0, 20}], x]] (* Vaclav Kotesovec, Mar 20 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Oct 12 2009
STATUS
approved