A120982
Triangle read by rows: T(n,k) is the number of ternary trees with n edges and having k vertices of outdegree 2 (n >= 0, k >= 0).
Original entry on oeis.org
1, 3, 9, 3, 28, 27, 93, 162, 18, 333, 825, 270, 1272, 3915, 2430, 135, 5085, 18144, 17199, 2835, 20925, 84000, 106596, 34020, 1134, 87735, 391554, 612360, 308448, 30618, 372879, 1838295, 3369600, 2364390, 459270, 10206, 1602450, 8674380
Offset: 0
T(2,1)=3 because we have (Q,L,M), (Q,L,R) and (Q,M,R), where Q denotes the root and L (M,R) denotes a left (middle, right) child of Q.
Triangle starts:
1;
3;
9, 3;
28, 27;
93, 162, 18;
333, 825, 270;
-
T:=(n,k)->(1/(n+1))*binomial(n+1,k)*sum(3^(n-k-3*q)*binomial(n+1-k,k+1+2*q)*binomial(n-2*k-2*q,q),q=0..n/2-k):for n from 0 to 12 do seq(T(n,k),k=0..floor(n/2)) od; # yields sequence in triangular form
A120429
Triangle read by rows: T(n,k) is the number of ternary trees with n edges and having k leaves (i.e., vertices of degree 0; n>=0, k>=1). 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.
Original entry on oeis.org
1, 3, 9, 3, 27, 27, 1, 81, 162, 30, 243, 810, 360, 15, 729, 3645, 2970, 405, 3, 2187, 15309, 19845, 5670, 252, 6561, 61236, 115668, 56700, 6426, 84, 19683, 236196, 612360, 459270, 98658, 4536, 12, 59049, 885735, 3018060, 3214890, 1122660
Offset: 0
T(2,2)=3 because we have (Q,L,M), (Q,L,R) and (Q,M,R), where Q denotes the root and L (M,R) denotes a left (middle, right) child of Q.
Triangle starts:
1;
3;
9, 3;
27, 27, 1;
81, 162, 30;
243, 810, 360, 15;
-
T:=proc(n,k) if k<=n+1-ceil(n/3) then (1/(n+1))*binomial(n+1,k)*sum(3^(n+j-2*k+2)*binomial(n+1-k,j)*binomial(j,k-1-j),j=0..n+1-k) else 0 fi end: 1; for n from 1 to 11 do seq(T(n,k),k=1..n+1-ceil(n/3)) od; # yields sequence in triangular form
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
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;
-
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
A120984
Number of ternary trees with n edges and having no vertices of degree 1. 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.
Original entry on oeis.org
1, 0, 3, 1, 18, 15, 138, 189, 1218, 2280, 11826, 27225, 123013, 325611, 1346631, 3919188, 15318342, 47563620, 179405250, 582336054, 2148831144, 7191954822, 26193070008, 89559039141, 323765075223, 1123859351610, 4047466156545
Offset: 0
a(2)=3 because we have (Q,L,M), (Q,L,R) and (Q,M,R), where Q denotes the root and L (M,R) denotes a left (middle, right) child of Q.
-
a:=n->sum(3^(3*j-n)*binomial(n+1,j)*binomial(j,n-2*j),j=0..n+1)/(n+1): seq(a(n),n=0..30);
-
Array[Sum[3^(3 j - #)*Binomial[# + 1, j]*Binomial[j, # - 2 j], {j, 0, # + 1}]/(# + 1) &, 27, 0] (* Michael De Vlieger, Jul 02 2021 *)
Showing 1-4 of 4 results.
Comments