OFFSET
0,5
COMMENTS
a(n)=A167634(n,0).
FORMULA
G.f.: G = [1 + 2z - z^3 - sqrt(1 - 4z^2 - 2z^3 + z^6)]/[2z(1 + z - z^2)].
D-finite with recurrence (n+1)*a(n) +a(n-1) +(-4*n+5)*a(n-2) +(-2*n+7)*a(n-3) +3*a(n-4) +a(n-5) +(n-6)*a(n-6)=0. - R. J. Mathar, Jul 26 2022
EXAMPLE
a(6)=5 because we have UUDDUUDDUUDD, UUDDUUUUDDDD, UUUUDDDDUUDD, UUUUDDUUDDDD, and UUUUUUDDDDDD.
MAPLE
G := ((1+2*z-z^3-sqrt(1-4*z^2-2*z^3+z^6))*1/2)/(z*(1+z-z^2)): Gser := series(G, z = 0, 40): seq(coeff(Gser, z, n), n = 0 .. 38);
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Nov 08 2009
STATUS
approved