login
A002707
Number of ternary trees with n nodes.
(Formerly M3128 N1268)
0
1, 1, 3, 31, 8401, 100130704103, 167321084032306100365838018661441, 780729803567659232170209385771412393899822868427528396719062233553621064241305757906662806984051
OFFSET
0,3
COMMENTS
Consider the free algebraic system with one ternary commutative b(x,y,z) operator and one generator A. The number of elements of height n is a(n) where the height of A is zero and the height of b(x,y,z) is one more than the maximum heights of x, y and z. - Michael Somos, Mar 06 2012
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(n) = a(n-1)*(a(n-1)+a(n-2))*(a(n-1)+a(n-2)+a(n-3))/6 + a(n-1)*(a(n-1)+a(n-2))/(a(n-2)+a(n-3))*(a(n-1)/a(n-2)-a(n-2)/a(n-3)) + a(n-1)^2/a(n-2). - James Sellers, Feb 14 2000
MATHEMATICA
RecurrenceTable[{a[0]==a[1]==1, a[2]==3, a[n]==a[n-1](a[n-1]+a[n-2])(a[n-1]+a[n-2]+a[n-3])/6+ a[n-1](a[n-1]+a[n-2])/(a[n-2]+a[n-3])(a[n-1]/a[n-2]-a[n-2]/a[n-3])+a[n-1]^2/a[n-2]}, a, {n, 10}] (* Harvey P. Dale, Feb 27 2012 *)
SetAttributes[b, Orderless]; S[0] = {A}; S[n_] := S[n] = Union @ Flatten[ Table[ Outer[ b, S[k1], S[k2], S[n - 1]], {k1, 0, n - 1}, {k2, 0, n - 1}], 4]; a[ n_] := Length @ S[n]; (* Michael Somos, Mar 06 2012 *)
CROSSREFS
Sequence in context: A022499 A129209 A134721 * A283247 A261472 A144964
KEYWORD
nonn,nice,easy,changed
EXTENSIONS
More terms from James Sellers, Feb 14 2000
STATUS
approved