login
Triangle read by rows: T(n,k) is the number of peakless Motzkin paths of length n having k weak peaks.
2

%I #11 Sep 15 2014 14:42:10

%S 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,

%T 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,

%U 128,232,164,107,56,25,8,1,1,0,512,256,544,400,286,164,78,32,9,1

%N Triangle read by rows: T(n,k) is the number of peakless Motzkin paths of length n having k weak peaks.

%C A weak peak of a Motzkin path is a vertex on the top of a hump.

%C A hump is an upstep followed by 0 or more flatsteps followed by a downstep. For example, the peakless Motzkin path uhu*h*ddu*h*h*d where u=(1,1), h=(1,0), d(1,-1), has 5 weak peaks (shown by the stars).

%C Row n (n>=1) contains n entries.

%C Sum of entries in row n is the RNA secondary structure number A004148(n).

%C Sum(k*T(n,k), 0<=k<=n) = A247289(n).

%H Alois P. Heinz, <a href="/A247288/b247288.txt">Rows n = 0..141, flattened</a>

%F 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.

%e 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).

%e Triangle starts:

%e 1;

%e 1;

%e 1,0;

%e 1,0,1;

%e 1,0,2,1;

%e 1,0,4,2,1;

%e 1,0,8,4,3,1;

%p 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

%Y Cf. A004148, A247289.

%K nonn,tabf

%O 0,10

%A _Emeric Deutsch_, Sep 14 2014