OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = Sum_{k>=0} k*A191523(n,k).
G.f.: 2*((1-3*z^2-z^3)*q - 1 +5*z^2 +z^3 - 4*z^4)/(z*q*(1-2*z-q)^2), where q = sqrt(1-4*z^2).
a(n) ~ 2^(n-3/2)*sqrt(n)/sqrt(Pi) * (1 + sqrt(2*Pi/n)). - Vaclav Kotesovec, Mar 21 2014
D-finite with recurrence -2*(n+1)*(12*n-13)*a(n) +(67*n^2-189*n-52)*a(n-1) +2*(29*n^2+133*n+8)*a(n-2) +4*(-67*n^2+256*n-520)*a(n-3) +8*(n-4)*(19*n-128)*a(n-4)=0. - R. J. Mathar, Jul 24 2022
EXAMPLE
a(4)=8 because in UDUD, UDUU, UUDD, UUDU, UUUD, and UUUU we have a total of 0+1+1+1+2+3=8 UUs (here U=(1,1) and D=(1,-1)).
MAPLE
q:= sqrt(1-4*z^2): g := (2*((1-3*z^2-z^3)*q-1+5*z^2+z^3-4*z^4))/(z*q*(1-2*z-q)^2): gser := series(g, z = 0, 36): seq(coeff(gser, z, n), n = 0 .. 33);
MATHEMATICA
CoefficientList[Series[(2*((1-3*x^2-x^3)*Sqrt[1-4*x^2]-1+5*x^2+x^3-4*x^4))/(x*Sqrt[1-4*x^2]*(1-2*x-Sqrt[1-4*x^2])^2), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 21 2014 *)
PROG
(PARI) z='z+O('z^50); concat([0, 0], Vec(2*((1-3*z^2-z^3)*sqrt(1-4*z^2) - 1 +5*z^2 +z^3 - 4*z^4)/(z*sqrt(1-4*z^2)*(1-2*z-sqrt(1-4*z^2))^2))) \\ G. C. Greubel, Mar 27 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Jun 05 2011
STATUS
approved