OFFSET
0,7
COMMENTS
a(n)=Sum(k*A097100(n,k), k>=0).
FORMULA
G.f.: G(z)=2z^3*g^3*(g-1)/[(1-z)(1-z^2*g^2)], where g=1+zg+z^2*g(g-1).
EXAMPLE
a(6)=2 because among the 17 (=A004148(6)) peakless Motzkin paths of length 6 only (uhu)hdd and uuh(dhd) have subwords of the prescribed type (shown between parentheses).
MAPLE
eq := g = 1+z*g+z^2*g*(g-1): g := RootOf(eq, g): gser := series(2*z^5*g^3*(g-1)/((1-z)*(1-z^2*g^2)), z = 0, 38): seq(coeff(gser, z, n), n = 0 .. 33);
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, May 05 2011
STATUS
approved