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 A120983 #9 Nov 16 2019 10:32:35 %S A120983 1,3,12,54,1,261,12,1323,105,6939,810,3,37341,5859,63,205011,40824, %T A120983 840,1143801,277830,9072,12,6466230,1861380,86670,360,36960300, %U A120983 12335895,764478,6435,213243435,81120204,6377778,89100,55,1240219269,530408736 %N A120983 Triangle read by rows: T(n,k) is the number of ternary trees with n edges and having k vertices of outdegree 3 (n >= 0, k >= 0). %C A120983 A ternary tree is a rooted tree in which each vertex has at most three children and each child of a vertex is designated as its left or middle or right child. %F A120983 T(n,k) = (1/(n+1))*binomial(n+1,k)*Sum_{j=0..n+1-k} 3^j*binomial(n+1-k, j)*binomial(j, n-3k-j). %F A120983 G.f.: G = G(t,z) satisfies G = 1 + 3zG + 3z^2*G^2 + tz^3*G^3. %F A120983 Row n has 1+floor(n/3) terms. %F A120983 Row sums yield A001764. %F A120983 T(n,0) = A107264(n). %F A120983 Sum_{k>=1} k*T(n,k) = binomial(3n, n-3) = A004321(n). %e A120983 T(3,1)=1 because we have (Q,L,M,R), where Q denotes the root and L (M,R) denotes a left (middle, right) child of Q. %e A120983 Triangle starts: %e A120983 1; %e A120983 3; %e A120983 12; %e A120983 54, 1; %e A120983 261, 12; %e A120983 1323, 105; %e A120983 6939, 810, 3; %p A120983 T:=(n,k)->(1/(n+1))*binomial(n+1,k)*sum(3^j*binomial(n+1-k,j)*binomial(j,n-3*k-j),j=0..n+1-k): for n from 0 to 14 do seq(T(n,k),k=0..floor(n/3)) od; # yields sequence in triangular form %Y A120983 Cf. A001764, A107264, A120429, A120981, A120982, A004321. %K A120983 nonn,tabf %O A120983 0,2 %A A120983 _Emeric Deutsch_, Jul 21 2006