A247288 Triangle read by rows: T(n,k) is the number of peakless Motzkin paths of length n having k weak peaks.
1, 1, 1, 0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 4, 2, 1, 1, 0, 8, 4, 3, 1, 1, 0, 16, 8, 7, 4, 1, 1, 0, 32, 16, 17, 10, 5, 1, 1, 0, 64, 32, 41, 26, 14, 6, 1, 1, 0, 128, 64, 98, 66, 39, 19, 7, 1, 1, 0, 256, 128, 232, 164, 107, 56, 25, 8, 1, 1, 0, 512, 256, 544, 400, 286, 164, 78, 32, 9, 1
Offset: 0
Examples
Row 4 is 1,0,2,1 because the peakless Motzkin paths hhhh, u*h*dhh, hu*h*dh, and u*h*h*d have 0, 2, 2, and 3 weak peaks (shown by the stars). Triangle starts: 1; 1; 1,0; 1,0,1; 1,0,2,1; 1,0,4,2,1; 1,0,8,4,3,1;
Links
- Alois P. Heinz, Rows n = 0..141, flattened
Programs
-
Maple
eq := G = 1+z*G+z^2*(G-1-z/(1-z)+t^2*z/(1-t*z))*G: G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 16)): for n from 0 to 14 do P[n] := sort(expand(coeff(Gser, z, n))) end do: 1; for n to 14 do seq(coeff(P[n], t, k), k = 0 .. n-1) end do; # yields sequence in triangular form
Formula
The g.f. G(t,z) satisfies G = 1 + z*G + z^2*(G - 1 - z/(1-z) + t^2*z/(1-t*z))*G.
Comments