login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Triangle read by rows: T(n,k) is the number of peakless Motzkin paths in which the k-th step is the leftmost (1,0)-step (can be easily expressed using RNA secondary structure terminology).
0

%I #19 Jul 18 2024 03:34:07

%S 1,1,1,1,2,2,4,3,1,8,6,3,17,13,6,1,37,28,13,4,82,62,30,10,1,185,140,

%T 69,24,5,423,320,160,59,15,1,978,740,375,144,40,6,2283,1728,885,350,

%U 105,21,1,5373,4068,2102,852,271,62,7,12735,9645,5022,2077,690,174,28,1,30372

%N Triangle read by rows: T(n,k) is the number of peakless Motzkin paths in which the k-th step is the leftmost (1,0)-step (can be easily expressed using RNA secondary structure terminology).

%C Row sums yield the RNA secondary structure numbers (A004148).

%C Row n has ceiling(n/2) terms.

%H I. L. Hofacker, P. Schuster and P. F. Stadler, <a href="https://doi.org/10.1016/S0166-218X(98)00073-0">Combinatorics of RNA secondary structures</a>, Discrete Appl. Math., 88, 1998, 207-237.

%H P. R. Stein and M. S. Waterman, <a href="https://doi.org/10.1016/0012-365X(79)90033-5">On some new sequences generalizing the Catalan and Motzkin numbers</a>, Discrete Math., 26 (1979), 261-272.

%H M. Vauchassade de Chaumont and G. Viennot, <a href="http://www.mat.univie.ac.at/~slc/opapers/s08viennot.html">Polynômes orthogonaux et problèmes d'énumération en biologie moléculaire</a>, Sem. Loth. Comb. B08l (1984) 79-86.

%F T(n,k) = k*Sum_{j=ceiling((n-2k+2)/2)..n-2k+1} (1/j)*binomial(j, n-2k+1-j)*binomial(j+k-1, n-k+1-j) if 2k < n+1 and T(n,k)=1 if 2k = n+1.

%F G.f.: t*z*g/(1-t*z^2*g), where g = (1 - z + z^2 - sqrt(1 - 2*z - z^2 - 2*z^3 + z^4))/(2z^2) is the g.f. for the RNA secondary structure numbers (A004148).

%e Triangle starts:

%e 1;

%e 1;

%e 1, 1;

%e 2, 2;

%e 4, 3, 1;

%e 8, 6, 3;

%e 17, 13, 6, 1;

%e T(5,2)=3 because we have UHDHH, UHHDH and UHHHD, where U=(1,1), H=(1,0) and D=(1,-1); these are the only peakless Motzkin paths of length 5 in which the second step is the first occurrence of H.

%p T:=proc(n,k) if 2*k-1=n then 1 else k*sum(binomial(j,n-2*k+1-j)*binomial(j+k-1,n-k+1-j)/j,j=ceil((n-2*k+2)/2)..n-2*k+1) fi end: seq(seq(T(n,k),k=1..ceil(n/2)),n=0..16); # yields the sequence in linear form T:=proc(n,k) if 2*k-1=n then 1 else k*sum(binomial(j,n-2*k+1-j)*binomial(j+k-1,n-k+1-j)/j,j=ceil((n-2*k+2)/2)..n-2*k+1) fi end: matrix(10,10,T); # yields the sequence in triangular form

%t T[n_, k_] := Which[2k < n+1, k*Sum[(1/j)*Binomial[j, n-2k+1-j]* Binomial[j+k-1, n-k+1-j], {j, Ceiling[(n-2k+2)/2], n-2k+1}], 2k == n+1, 1, True, 0];

%t Table[T[n, k], {n, 0, 16}, {k, 1, Ceiling[n/2]}] // Flatten (* _Jean-François Alcover_, Jul 18 2024 *)

%Y Cf. A004148.

%K nonn,tabf

%O 1,5

%A _Emeric Deutsch_, Sep 13 2004