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 A109158 #6 Oct 06 2015 17:41:03 %S A109158 1,1,2,4,3,1,10,20,18,12,5,1,66,132,122,92,54,24,7,1,498,996,930,732, %T A109158 478,264,118,40,9,1,4066,8132,7634,6140,4214,2552,1342,600,218,60,11, %U A109158 1,34970,69940,65874,53676,37910,24136,13782,7016,3122,1180,362,84,13,1 %N A109158 Triangle read by rows: T(n,k) is number of paths from (0,0) to (3n,0) that stay in the first quadrant (but may touch the horizontal axis), consisting of steps u=(2,1),U=(1,2), or d=(1,-1) and having height of last peak equal to k. %C A109158 Row n has 2n terms. Row sums yield A027307. T(n,1)=A027307(n-1). T(n,2)=2*A027307(n-1) for n>=2. %H A109158 Emeric Deutsch, <a href="http://www.jstor.org/stable/2589192">Problem 10658: Another Type of Lattice Path</a>, American Math. Monthly, 107, 2000, 368-370. %F A109158 G.f.=tz(1+t)/[1-tz-t^2z-(1+t)zA-zA^2], where A=1+zA^2+zA^3=(2/3)*sqrt((z+3)/z)*sin((1/3)*arcsin(sqrt(z)*(z+18)/(z+3)^(3/2)))-1/3 (the g.f. of A027307). %e A109158 T(2,3)=3 because we have uUddd, UdUddd and Uuddd. %e A109158 Triangle begins: %e A109158 1,1; %e A109158 2,4,3,1; %e A109158 10,20,18,12,5,1; %e A109158 66,132,122,92,54,24,7,1; %p A109158 A:=(2/3)*sqrt((z+3)/z)*sin((1/3)*arcsin(sqrt(z)*(z+18)/(z+3)^(3/2)))-1/3: G:=t*z*(1+t)/(1-t*z-t^2*z-(1+t)*z*A-z*A^2): Gser:=simplify(series(G,z=0,10)): for n from 1 to 8 do P[n]:=coeff(Gser,z^n) od: for n from 1 to 8 do seq(coeff(P[n],t^k),k=1..2*n) od; # yields sequence in triangular form %Y A109158 Cf. A027307. %K A109158 nonn,tabf %O A109158 1,3 %A A109158 _Emeric Deutsch_, Jun 21 2005