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.

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).

Original entry on oeis.org

1, 3, 12, 54, 1, 261, 12, 1323, 105, 6939, 810, 3, 37341, 5859, 63, 205011, 40824, 840, 1143801, 277830, 9072, 12, 6466230, 1861380, 86670, 360, 36960300, 12335895, 764478, 6435, 213243435, 81120204, 6377778, 89100, 55, 1240219269, 530408736
Offset: 0

Views

Author

Emeric Deutsch, Jul 21 2006

Keywords

Comments

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.

Examples

			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.
Triangle starts:
     1;
     3;
    12;
    54,   1;
   261,  12;
  1323, 105;
  6939, 810, 3;
		

Crossrefs

Programs

  • Maple
    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

Formula

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).
G.f.: G = G(t,z) satisfies G = 1 + 3zG + 3z^2*G^2 + tz^3*G^3.
Row n has 1+floor(n/3) terms.
Row sums yield A001764.
T(n,0) = A107264(n).
Sum_{k>=1} k*T(n,k) = binomial(3n, n-3) = A004321(n).