cp's OEIS Frontend

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.

A114690 Triangle read by rows: T(n,k) is the number of Motzkin paths of length n and having k weak ascents (1 <= k <= ceiling(n/2)).

This page as a plain text file.
%I A114690 #23 Mar 07 2023 11:07:28
%S A114690 1,2,3,1,5,4,8,12,1,13,31,7,21,73,32,1,34,162,116,11,55,344,365,70,1,
%T A114690 89,707,1041,335,16,144,1416,2762,1340,135,1,233,2778,6932,4726,820,
%U A114690 22,377,5358,16646,15176,4039,238,1,610,10188,38560,45305,17157,1785,29,987
%N A114690 Triangle read by rows: T(n,k) is the number of Motzkin paths of length n and having k weak ascents (1 <= k <= ceiling(n/2)).
%C A114690 A Motzkin path of length n is a lattice path from (0,0) to (n,0) consisting of U=(1,1), D=(1,-1) and H=(1,0) steps and never going below the x-axis. A weak ascent in a Motzkin path is a maximal sequence of consecutive U and H steps.
%C A114690 Row n has ceiling(n/2) terms.
%C A114690 Row sums are the Motzkin numbers (A001006).
%C A114690 Column 1 yields the Fibonacci numbers (A000045).
%C A114690 Sum_{k=1..ceiling(n/2)} k*T(n,k) = A005773(n).
%H A114690 Alois P. Heinz, <a href="/A114690/b114690.txt">Rows n = 1..200, flattened</a>
%H A114690 Jean-Luc Baril and José Luis Ramírez, <a href="https://arxiv.org/abs/2302.12741">Descent distribution on Catalan words avoiding ordered pairs of Relations</a>, arXiv:2302.12741 [math.CO], 2023.
%H A114690 Marilena Barnabei, Flavio Bonetti, Niccolò Castronuovo, and Matteo Silimbani, <a href="https://arxiv.org/abs/1902.02213">Consecutive patterns in restricted permutations and involutions</a>, arXiv:1902.02213 [math.CO], 2019.
%F A114690 G.f. G = G(t, z) satisfies G = z*(t+G)*(1+z+z*G).
%e A114690 T(4,2)=4 because we have (HU)D(H),(U)D(HH),(U)D(U)D and (UH)D(H) (the weak ascents are shown between parentheses).
%e A114690 Triangle starts:
%e A114690    1;
%e A114690    2;
%e A114690    3,  1;
%e A114690    5,  4;
%e A114690    8, 12,  1;
%e A114690   13, 31,  7;
%e A114690   ...
%p A114690 G:=(1-t*z^2-z-z^2-sqrt(1-2*t*z^2-2*z-z^2+t^2*z^4-2*t*z^3-2*z^4*t+2*z^3+z^4))/2/z^2: Gser:=simplify(series(G,z=0,18)): for n from 1 to 15 do P[n]:=coeff(Gser,z^n) od: for n from 1 to 15 do seq(coeff(P[n],t^j),j=1..ceil(n/2)) od; # yields sequence in triangular form
%p A114690 # second Maple program:
%p A114690 b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0, `if`(x=0, t,
%p A114690       b(x-1, y+1, z)+expand(b(x-1, y-1, 1)*t)+b(x-1, y, z)))
%p A114690     end:
%p A114690 T:= n-> (p-> seq(coeff(p, z, i), i=1..degree(p)))(b(n, 0, 1)):
%p A114690 seq(T(n), n=1..14);  # _Alois P. Heinz_, Nov 16 2019
%t A114690 b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x==0, t,
%t A114690      b[x-1, y+1, z] + Expand[b[x-1, y-1, 1]*t] + b[x-1, y, z]]];
%t A114690 T[n_] := CoefficientList[b[n, 0, 1]/z, z];
%t A114690 Array[T, 14] // Flatten (* _Jean-François Alcover_, Feb 14 2021, after _Alois P. Heinz_ *)
%Y A114690 Cf. A001006, A005773, A000045, A114655.
%K A114690 nonn,tabf
%O A114690 1,2
%A A114690 _Emeric Deutsch_, Dec 24 2005