|
|
A064017
|
|
Number of ternary trees (A001764) with n nodes and maximal diameter.
|
|
9
|
|
|
1, 3, 12, 45, 162, 567, 1944, 6561, 21870, 72171, 236196, 767637, 2480058, 7971615, 25509168, 81310473, 258280326, 817887699, 2582803260, 8135830269, 25569752274, 80196041223, 251048476872, 784526490225, 2447722649502
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
A problem important for polymer science because it counts the trees having unbranched branches; they are called "combs".
Equals (1, 3, 9, 27, 81, ...) convolved with (1, 0, 3, 9, 27, 81, ...). Example: a(5) = 162 = (81, 27, 9, 3, 1) dot (1, 0, 3, 9, 27) = 81 + 3*27. - Gary W. Adamson, Jul 31 2010
Floretion Algebra Multiplication Program, FAMP Code: lesforseq[ - 'i + 'j - 'kk' - 'ki' - 'kj' ], vesforseq(n) = 3^n, tesforseq = A006234
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 3*a(n-1) + 3^(n-2).
a(n) = (n+1)*3^(n-2), for n > 1.
a(n) = (n+2)3^(n-1) + 0^n/3 (offset 0).
a(n) = 6*a(n-1) - 9*a(n-2), with a(1)=1, a(2)=3, a(3)=12. - Harvey P. Dale, Feb 07 2012
Sum_{n>=1} 1/a(n) = 27*log(3/2) - 19/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = 17/2 - 27*log(4/3). (End)
|
|
EXAMPLE
|
a(5) = 162 because we can write (5+1)*3^(5-2) = 6*3^3 = 6*27.
|
|
MAPLE
|
a:=n->ceil(sum(3^(n-2), j=0..n)): seq(a(n), n=1..26); # Zerinvary Lajos, Jun 05 2008
|
|
MATHEMATICA
|
Join[{1}, Table[(n+1)3^(n-2), {n, 2, 30}]] (* or *) Join[{1}, LinearRecurrence[ {6, -9}, {3, 12}, 30]] (* Harvey P. Dale, Feb 07 2012 *)
|
|
PROG
|
(PARI) { for (n=1, 200, if (n>1, a=(n + 1)*p; p*=3, a=p=1); write("b064017.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 06 2009
(PARI) a(n)=if(n==1, 1, (n+1)*3^(n-2)); \\ Joerg Arndt, May 06 2013
(SageMath)
@CachedFunction
def BB(n, k, x): # modified cardinal B-splines
if n == 1: return 0 if (x < 0) or (x >= k) else 1
return x*BB(n-1, k, x) + (n*k-x)*BB(n-1, k, x-k)
def EulerianPolynomial(n, k, x):
if n == 0: return 1
return add(BB(n+1, k, k*m+1)*x^m for m in (0..n))
def A064017(n) : return 3^(n-1)*EulerianPolynomial(1, n-1, 1/3) if n != 1 else 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,nice,easy,changed
|
|
AUTHOR
|
Danail Bonchev (bonchevd(AT)aol.com), Sep 07 2001
|
|
STATUS
|
approved
|
|
|
|