OFFSET
0,5
COMMENTS
Same as A089742 except for the first three terms. - Georg Fischer, Oct 14 2018
FORMULA
G.f.: z^3*G^2/((1-z)*(1-z^2*G^2)), where G = 1+z*G+z^2*G*(G-1).
a(n) = Sum_{k>=0} k*A089741(n,k).
D-finite with recurrence (-n+1)*a(n) +(4*n-7)*a(n-1) +(-5*n+16)*a(n-2) +(5*n-22)*a(n-3) +(-5*n+18)*a(n-4) +(5*n-24)*a(n-5) +(-4*n+25)*a(n-6) +(n-7)*a(n-7)=0. - R. J. Mathar, Jul 22 2022
EXAMPLE
a(4)=3 because in HHHH, HUHD, UHDH and UHHD we have 0+1+1+1 subwords of the type UH^jD.
MAPLE
eq := g = 1+z*g+z^2*g*(g-1): G := RootOf(eq, g): Gser := series(z^3*G^2/((1-z)*(1-z^2*G^2)), z = 0, 35): seq(coeff(Gser, z, n), n = 0 .. 32);
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, May 05 2011
STATUS
approved