A052316 Number of labeled rooted trees with n nodes and 2-colored internal (non-leaf) nodes.
1, 4, 30, 344, 5370, 106452, 2562182, 72592816, 2367054450, 87320153900, 3595646533182, 163492924997448, 8136172620013802, 439858024910227588, 25670670464821310070, 1608575860476990991712, 107716675117341985862370
Offset: 1
Links
- N. J. A. Sloane, Transforms
- Index entries for sequences related to rooted trees
Programs
-
Mathematica
a[n_] := Sum[j^(n-1)*2^j*(-1)^(n-j)*Binomial[n, j], {j, 1, n}]; a[1] = 1; Table[a[n], {n, 1, 17}] (* Jean-François Alcover, Feb 26 2013, after Vladimir Kruchinin *)
-
Maxima
a(n):=if n=1 then 1 else sum(j^(n-1)*2^j*(-1)^(n-j)*binomial(n,j),j,1,n); /* Vladimir Kruchinin, Jan 24 2012 */
Formula
Divides by 2n and shifts left under exponential transform.
E.g.f.: -x-LambertW(-2*x*exp(-x)). - Vladeta Jovovic, Sep 17 2003
a(n) = sum(j=1..n, j^(n-1)*2^j*(-1)^(n-j)*binomial(n,j)), n>1, a(1)=1. - Vladimir Kruchinin, Jan 24 2012
a(n) ~ sqrt(1+LambertW(-exp(-1)/2)) * n^(n-1) / (exp(n)*(-LambertW(-exp(-1)/2))^n). - Vaclav Kotesovec, Oct 05 2013