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-4 of 4 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

A052746 a(0) = 0; a(n) = (2*n)^(n-1), n > 0.

Original entry on oeis.org

0, 1, 4, 36, 512, 10000, 248832, 7529536, 268435456, 11019960576, 512000000000, 26559922791424, 1521681143169024, 95428956661682176, 6502111422497947648, 478296900000000000000, 37778931862957161709568, 3189059870763703892770816, 286511799958070431838109696
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Expansion of inverse of x*exp(2x).
Number of well-colored directed trees on n nodes. Well-colored means, each green vertex has at least a red child, each red vertex has no red child.
Number of labeled rooted directed trees on n nodes.

Crossrefs

Cf. A019762 (2*e), A038057, A097627.

Programs

  • Maple
    spec := [S,{B=Set(S),S=Prod(Z,B,B)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    terms = 19;
    A[x_] = -1/2 LambertW[-2 x];
    CoefficientList[A[x] + O[x]^terms, x] Range[0, terms-1]! (* Jean-François Alcover, Jan 15 2019 *)
    Join[{0},Table[(2n)^(n-1),{n,20}]] (* Harvey P. Dale, Dec 14 2020 *)
  • PARI
    a(n)=if(n,(2*n)^(n-1),0) \\ Charles R Greathouse IV, Nov 20 2011
  • Sage
    [lucas_number1(n, 2*n, 0) for n in range(0, 17)] # Zerinvary Lajos, Mar 09 2009
    

Formula

E.g.f.: -1/2*W(-2*x), where W is Lambert's W function.
From Robert Israel, Jun 16 2016: (Start)
E.g.f. g(x) satisfies g(x) = x*exp(2*g(x)) and (1-2*g(x)) g'(x) = g(x).
a(n) = (2*n/(n-1)) * Sum_{j=1..n-1} binomial(n-1,j)*a(j)*a(n-j) for n >= 2. (End)
a(n) = [x^n] x/(1 - 2*n*x). - Ilya Gutkovskiy, Oct 12 2017
Limit_{n->oo} a(n+1)/(n*a(n)) = 2*e. - Stefano Spezia, Mar 12 2023

Extensions

New description from Vladeta Jovovic, Mar 08 2003

A097630 Number of unrooted directed trees on n nodes with a red root.

Original entry on oeis.org

1, 1, 7, 70, 1093, 22426, 578779, 17976302, 653866441, 27270138898, 1283303262151, 67277393090854, 3888789288662029, 245724292311198650, 16851817924083466003, 1246663922538961356766, 98960637955717312632721
Offset: 1

Views

Author

Ralf Stephan, Aug 17 2004

Keywords

Crossrefs

Cf. A097629.

Programs

  • Mathematica
    terms = 17;
    Rest[CoefficientList[LambertW[-LambertW[-2x]/2] + O[x]^(terms+1), x]]* Range[0, terms-1]! (* Jean-François Alcover, Dec 13 2018 *)
  • PARI
    seq(n)={Vec(serlaplace(lambertw(-lambertw(-2*x + O(x*x^n))/2)/x))} \\ Andrew Howroyd, Dec 13 2018

Formula

E.g.f.: A(x) = 2B - 2BC + C - 2B/C + C^2/2, with B = egf of A052746 and C = egf of A097627.
a(n) = (n-1)!*[x^n](LambertW(-LambertW(-2x)/2)). - Jean-François Alcover, Dec 13 2018
a(n) ~ 2^n * n^(n-2) / (1 + 1/LambertW(1/2)). - Vaclav Kotesovec, Feb 24 2019

A097628 Number of rooted directed trees on n nodes with a green root.

Original entry on oeis.org

0, 2, 15, 232, 4535, 114276, 3478083, 124625040, 5135162607, 239298611020, 12443586907763, 714352426078776, 44874695909075799, 3061971330141166548, 225519631138748009955, 17832309102333780001312
Offset: 1

Views

Author

Ralf Stephan, Aug 17 2004

Keywords

Comments

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 A052746(n) - A097627(n).

Programs

  • Mathematica
    terms = 16;
    c[x_] = -LambertW[-x];
    A[x_] = c[2x]/2 + c[-c[2x]/2];
    CoefficientList[A[x]/x + O[x]^terms, x] Range[terms]! (* Jean-François Alcover, Jan 15 2019 *)

Formula

E.g.f.: A(x) = C(2x)/2+C(-C(2x)/2), C(x) = e.g.f. of A000169.
Showing 1-4 of 4 results.