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.

A055541 Total number of leaves (nodes of vertex degree 1) in all labeled trees with n nodes.

Original entry on oeis.org

0, 2, 6, 36, 320, 3750, 54432, 941192, 18874368, 430467210, 11000000000, 311249095212, 9659108818944, 326173191714734, 11905721598812160, 467086816406250000, 19599665578316398592, 875901453762003632658, 41532319635035234107392, 2082547005958224830656820
Offset: 1

Views

Author

Keywords

Comments

Equivalently, a(n) is the number of rooted labeled trees such that the root node has degree 1. - Geoffrey Critzer, Feb 07 2012

Crossrefs

Essentially the same as A061302.

Programs

  • Magma
    [0,2] cat [n*(n-1)^(n-2): n in [3..10]]; // G. C. Greubel, Nov 11 2017
  • Mathematica
    Join[{0,2}, Table[Sum[n!/k! StirlingS2[n-2,n-k] k, {k,2,n-1}], {n,3,20}]] (* Geoffrey Critzer, Nov 22 2011 *)
    Join[{0,2}, Table[n*(n-1)^(n-2), {n,3,50}]] (* or *) Rest[With[{nmax = 40}, CoefficientList[Series[-x*LambertW[-x], {x, 0, nmax}], x]*Range[0, nmax]!]] (* G. C. Greubel, Nov 11 2017 *)
  • PARI
    for(n=1, 30, print1(if(n==1, 0, if(n==2, 2, n*(n-1)^(n-2))), ", ")) \\ G. C. Greubel, Nov 11 2017
    

Formula

From Vladeta Jovovic, Mar 31 2001: (Start)
a(n) = n*(n-1)^(n-2), n > 1.
E.g.f.: -x*LambertW(-x). (End)
a(n) = Sum_{k=1..n} (A055314(n, k)*k). - Christian G. Bower, Jun 12 2000
E.g.f.: x*T(x) where T(x) is the e.g.f. for A000169. - Geoffrey Critzer, Feb 07 2012

Extensions

More terms from Christian G. Bower, Jun 12 2000