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 A098977 #7 Apr 10 2013 15:31:06 %S A098977 1,1,1,2,2,1,4,5,3,2,9,14,9,6,4,21,42,28,19,13,9,51,132,90,62,43,30, %T A098977 21,127,429,297,207,145,102,72,51,323,1430,1001,704,497,352,250,178, %U A098977 127,835,4862,3432,2431,1727,1230,878,628,450,323,2188,16796,11934,8502 %N A098977 Triangle read by rows: counts ordered trees by number of edges and position of first edge that terminates at a vertex of outdegree 1. %C A098977 T(n,k) = number of ordered trees on n edges whose k-th edge (in preorder or "walk around from root" order) is the first one that terminates at a vertex of outdegree 1 (k=0 if there is no such edge). The first column and the main diagonal (after initial entry) are Motzkin numbers (A001006). Each interior entry is the sum of its North and East neighbors. %F A098977 G.f. for column k=0 is (1 - z - (1-2*z-3*z^2)^(1/2))/(2*z^2) = Sum_{n>=1}T(n, 0)z^n. G.f. for columns k>=1 is (t*(1 - (1 - 4*z)^(1/2) - 2*z))/ (1 - t + t*(1 - 4*z)^(1/2) + t*z + (1 - 2*t*z - 3*t^2*z^2)^(1/2)) = Sum_{n>=2, 1<=k<=n-1}T(n, k)z^n*t^k. %e A098977 Table begins %e A098977 \ k 0, 1, 2, ... %e A098977 n %e A098977 1 | 1 %e A098977 2 | 1, 1 %e A098977 3 | 2, 2, 1 %e A098977 4 | 4, 5, 3, 2 %e A098977 5 | 9, 14, 9, 6, 4 %e A098977 6 | 21, 42, 28, 19, 13, 9 %e A098977 7 | 51, 132, 90, 62, 43, 30, 21 %e A098977 8 |127, 429, 297, 207, 145, 102, 72, 51 %e A098977 T(4,2)=3 counts the following ordered trees (drawn down from root). %e A098977 ..|..../\..../|\.. %e A098977 ./.\....|.....|... %e A098977 .|......|......... %t A098977 Clear[v] MotzkinNumber[n_]/;IntegerQ[n] && n>=0 := If[0<=n<=1, 1, Module[{x = 1, y = 1}, Do[temp = ((2*i + 1)*y + 3*(i - 1)*x)/(i + 2); x = y; y = temp, {i, 2, n}]; y]]; v[n_, 0]/; n>=1 := MotzkinNumber[n-1]; v[n_, k_]/; k>=n := 0; v[n_, k_]/; n>=2 && k==n-1 := MotzkinNumber[n-2]; v[n_, k_]/; n>=3 && 1<=k<=n-2 := v[n, k] = v[n, k+1]+v[n-1, k]; TableForm[Table[v[n, k], {n, 10}, {k, 0, n-1}]] %Y A098977 Column k=1 is A000108 (apart from first term), k=2 is A000245, k=3 is A026012. %K A098977 nonn,tabl %O A098977 1,4 %A A098977 _David Callan_, Oct 24 2004