This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A097098 #15 Aug 30 2024 06:29:02 %S A097098 1,0,1,0,0,1,1,0,0,1,1,2,0,0,1,2,2,3,0,0,1,5,4,3,4,0,0,1,11,10,6,4,5, %T A097098 0,0,1,25,22,15,8,5,6,0,0,1,58,50,33,20,10,6,7,0,0,1,135,116,75,44,25, %U A097098 12,7,8,0,0,1,317,270,174,100,55,30,14,8,9,0,0,1,750,634,405,232,125,66,35,16,9,10,0,0,1 %N A097098 Triangle read by rows: T(n,k) is the number of peakless Motzkin paths of length n and having a total of k level steps (1,0) to the left of the first (1,1) step and to the right of the last (1,-1) step (i.e., total length of the two tails is k; can be easily expressed in terms of RNA secondary structure terminology). %C A097098 Row sums yield the RNA secondary structure numbers (A004148). Column 0 is A097779. %H A097098 I. L. Hofacker, P. Schuster and P. F. Stadler, <a href="http://dx.doi.org/10.1016/S0166-218X(98)00073-0">Combinatorics of RNA secondary structures</a>, Discrete Appl. Math., 88, 1998, 207-237. %H A097098 P. R. Stein and M. S. Waterman, <a href="http://dx.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 A097098 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. [Formerly: Publ. I.R.M.A. Strasbourg, 1984, 229/S-08, p. 79-86.] %F A097098 T(n,k) = (k+1)T(n-k, 0) for k < n; T(n,n) = 1. T(n,0) = a(n)-2a(n-1) + a(n-2) (n >= 2), where a(n) = Sum_{k=ceiling((n+1)/2)..n} binomial(k, n-k)*binomial(k, n-k+1)/k = A004148(n). %F A097098 G.f.: 1/(1-tz) + (1-z)(g-1-zg)/(1-tz)^2, where g = (1 - z + z^2 - sqrt(1 - 2z - z^2 - 2z^3 + z^4))/(2z^2) is the g.f. of the RNA secondary structure numbers (A004148). %e A097098 Triangle starts: %e A097098 1; %e A097098 0, 1; %e A097098 0, 0, 1; %e A097098 1, 0, 0, 1; %e A097098 1, 2, 0, 0, 1; %e A097098 2, 2, 3, 0, 0, 1; %e A097098 5, 4, 3, 4, 0, 0, 1; %e A097098 Row n has n+1 terms. %e A097098 T(6,3)=4 because we have (HHH)UHD, (HH)UHD(H), (H)UHD(HH) and UHD(HHH), where U=(1,1), H=(1,0) and D=(1,-1); the 3 required level steps are shown between parentheses. %p A097098 a:=proc(n) if n=0 then 1 else sum(binomial(j,n-j)*binomial(j,n-j+1)/j,j=ceil((n+1)/2)..n) fi end: T:=proc(n,k) if k<0 then 0 elif k<n-1 then (k+1)*(a(n-k)-2*a(n-k-1)+a(n-k-2)) elif k=n-1 then 0 elif k=n then 1 else 0 fi end: seq(seq(T(n,k),k=0..n),n=0..12); # yields the sequence in linear form: a:=proc(n) if n=0 then 1 else sum(binomial(k,n-k)*binomial(k,n-k+1)/k,k=ceil((n+1)/2)..n) fi end: T:=proc(n,k) if k<0 then 0 elif k<n-1 then (k+1)*(a(n-k)-2*a(n-k-1)+a(n-k-2)) elif k=n-1 then 0 elif k=n then 1 else 0 fi end: TT:=(n,k)->T(n-1,k-1): matrix(13,13,TT); # yields the sequence in matrix form: %t A097098 (* c is A004148 *) %t A097098 c[n_] := c[n] = If[n == 0, 1, c[n-1] + Sum[c[k]*c[n-2-k], {k, n-2}]]; %t A097098 T[n_, k_] := T[n, k] = Which[k < 0, 0, k < n-1, (k+1)*(c[n-k] - 2*c[n-k-1] + c[n-k-2]), k == n-1, 0, k == n, 1, True, 0]; %t A097098 Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Aug 30 2024 *) %Y A097098 Cf. A004148, A097779. %K A097098 nonn,tabl %O A097098 0,12 %A A097098 _Emeric Deutsch_, Sep 15 2004