login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of ternary trees with n edges and such that the first leaf in the preorder traversal is at level 1.
1

%I #36 Oct 04 2022 20:31:11

%S 3,3,10,42,198,1001,5304,29070,163438,937365,5462730,32256120,

%T 192565800,1160346492,7048030544,43108428198,265276342782,

%U 1641229898525,10202773534590,63698396932170,399223286267190,2510857763851185,15842014607109600,100244747986099080

%N Number of ternary trees with n edges and such that the first leaf in the preorder traversal is at level 1.

%C 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.

%H Ira Gessel and Guoce Xin, <a href="https://arxiv.org/abs/math/0505217">The generating function of ternary trees and continued fractions</a>, arXiv:math/0505217 [math.CO], 2005.

%H Ira Gessel and Guoce Xin, <a href="https://doi.org/10.37236/1079">The generating function of ternary trees and continued fractions</a>, Electronic Journal of Combinatorics, 13(1) (2006), #R53.

%F a(n) = A007226(n-1) for n >= 2.

%F a(1) = 3 and a(n) = (2/n)*binomial(3*n-3, n-1) for n >= 2.

%F G.f.: (h - 1 - z)/(h - 1), where h = 1 + z*h^3 = 2*sin(arcsin(sqrt(27*z/4))/3)/sqrt(3*z).

%F D-finite with recurrence 2*n*(2*n - 3)*a(n) - 3*(3*n - 4)*(3*n - 5)*a(n-1) = 0 for n >= 3. - _R. J. Mathar_, Jun 22 2016

%F G.f.: 1-(1-(4*sin(arcsin((3^(3/2)*sqrt(x))/2)/3)^2)/3)^3. - _Vladimir Kruchinin_, Oct 04 2022

%e a(1) = 3 because we have the trees /, | and \.

%e a(2) = 3 because we have the trees /|, /\ and |\.

%p a:=proc(n) if n=1 then 3 else (2/n)*binomial(3*n-3,n-1) fi end: seq(a(n),n=1..25);

%t a[1] = 3; a[n_] := (2/n) Binomial[3 n - 3, n - 1];

%t Array[a, 22] (* _Jean-François Alcover_, Nov 28 2017 *)

%Y Cf. A007226.

%Y Column 1 of A121445.

%K nonn

%O 1,1

%A _Emeric Deutsch_, Jul 30 2006