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.

Showing 1-2 of 2 results.

A097629 a(n) = 2*(2n)^(n-2).

Original entry on oeis.org

1, 2, 12, 128, 2000, 41472, 1075648, 33554432, 1224440064, 51200000000, 2414538435584, 126806761930752, 7340688973975552, 464436530178424832, 31886460000000000000, 2361183241434822606848, 187591757103747287810048
Offset: 1

Views

Author

Ralf Stephan, Aug 17 2004

Keywords

Comments

Number of all unrooted directed trees on n nodes.
Ditrees are well-colored directed trees. Well-colored means, each green vertex has at least a red child, each red vertex has no red child.

Crossrefs

Equals (1/2) A038058 = A097630(n) + A097631(n). Cf. A052746, A097627.

Programs

  • Magma
    [1] cat [2*(2*n)^(n-2): n in [2..20]]; // Vincenzo Librandi, Nov 19 2014
    
  • Mathematica
    Table[2*(2*n)^(n - 2), {n, 1, 50}] (* or *) With[{nmax = 40}, CoefficientList[Series[-LambertW[-2*x]*(1+LambertW[-2*x]/2)/2, {x, 0, nmax}], x]*Range[0, nmax]!] (* G. C. Greubel, Nov 15 2017 *)
  • Maxima
    a(n):=sum(k!*stirling2(n-1,k)*binomial(2*n,k),k,0,n-1)/(n); /* Vladimir Kruchinin, Nov 19 2014 */
    
  • PARI
    /* E.g.f. when offset=0 satisfies: */
    {a(n)=local(A=1+2*x);for(i=1,21,A=1+2*sum(n=1,21,x^(2*n-1)/(2*n-1)!*A^((4*n-1)/2))+x*O(x^n));n!*polcoeff(A,n)} \\ Paul D. Hanna, Sep 07 2012
    for(n=0,20,print1(a(n),", "))
    
  • PARI
    x='x+O('x^50); Vec(serlaplace(-lambertw(-2*x)*(1 + lambertw(-2*x)/2)/2)) \\ G. C. Greubel, Nov 15 2017

Formula

E.g.f.: A(x) = B(x)-B(x)^2, B(x) = e.g.f. of A052746 or A(x) = C(2*x)/2, C(x) = e.g.f. of A000272.
E.g.f. satisfies: A(x) = 1 + 2*Sum_{n>=1} x^(2*n-1)/(2*n-1)! * A(x)^((4*n-1)/2) when offset=0: A(x) = Sum_{n>=0} a(n)*x^n/n!. - Paul D. Hanna, Sep 07 2012
E.g.f. satisfies: A(x) = 1/A(-x*A(x)^2) when offset=0. - Paul D. Hanna, Sep 07 2012
a(n) = sum(k=0..n-1, k!*stirling2(n-1,k)*binomial(2*n,k))/n. - Vladimir Kruchinin, Nov 19 2014
E.g.f.: -LambertW(-2*x)*(1+LambertW(-2*x)/2)/2. - Vaclav Kotesovec, Dec 08 2014

A097631 Number of unrooted directed trees on n nodes with a green root.

Original entry on oeis.org

0, 1, 5, 58, 907, 19046, 496869, 15578130, 570573623, 23929861102, 1131235173433, 59529368839898, 3451899685313523, 218712237867226182, 15034642075916533997, 1114519318895861250082, 88631119148029975177327, 7526795487859400166772958, 679859967684397018073935617
Offset: 1

Views

Author

Ralf Stephan, Aug 17 2004

Keywords

Crossrefs

Equals A097629(n) - A097630(n).

Programs

  • Mathematica
    (* Note: Mathematica's ProductLog is the Lambert W function. *)
    a[n_] := SeriesCoefficient[-ProductLog[-ProductLog[-2x]/2]/n - ProductLog[-2x] (ProductLog[-2x] + 2)/4, {x, 0, n}] n!;
    Array[a, 17] (* Jean-François Alcover, Feb 24 2019 *)

Formula

a(n) ~ 2^(n-1) * n^(n-2) * (1 - LambertW(1/2)) / (1 + LambertW(1/2)). - Vaclav Kotesovec, Feb 24 2019
Showing 1-2 of 2 results.