A234953 Normalized total height of all rooted trees on n labeled nodes.
0, 1, 5, 37, 357, 4351, 64243, 1115899, 22316409, 505378207, 12789077631, 357769603027, 10965667062133, 365497351868767, 13163965052815515, 509522144541045811, 21093278144993719665, 930067462093579181119, 43518024090910884374263, 2153670733766937656155699
Offset: 1
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..387
Programs
-
Mathematica
gf[k_] := gf[k] = If[k == 0, x, x*E^gf[k-1]]; a[n_, k_] := n!*Coefficient[Series[gf[k], {x, 0, n+1}], x, n]; a[n_] := Sum[k*(a[n, k] - a[n, k-1]), {k, 1, n-1}]/n; Array[a, 20] (* Jean-François Alcover, Mar 18 2014, after Alois P. Heinz *)
-
Python
from sympy import binomial from sympy.core.cache import cacheit @cacheit def b(n, h): return 1 if min(n, h)==0 else sum([binomial(n - 1, j - 1)*j*b(j - 1, h - 1)*b(n - j, h) for j in range(1, n + 1)]) def T(n, k): return b(n - 1, k - 1) - b(n - 1, k - 2) def a(n): return sum([k*T(n, k) for k in range(1, n)]) print([a(n) for n in range(1, 31)]) # Indranil Ghosh, Aug 26 2017
Comments