login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of labeled rooted trees with n nodes with every leaf at the same height.
2

%I #35 Feb 29 2020 18:02:05

%S 1,2,9,40,265,1956,18529,183520,2226753,28663300,421589641,6696832704,

%T 117283627201,2190260755060,44645172510345,964646320357696,

%U 22317294448547329,547594529028427908,14246751684203363593,390309056795283743200,11276891642831796476481

%N Number of labeled rooted trees with n nodes with every leaf at the same height.

%H Alois P. Heinz, <a href="/A238372/b238372.txt">Table of n, a(n) for n = 1..200</a>

%F E.g.f.: Sum_{i>=1} P_i with P_1 = x and P_i = x * (exp(P_{i-1})-1) for i>1.

%F a(n) = T(n,1), T(n,m) = n!/(n-m)!*Sum_{k=1..n-m}(stirling2(k,m)*T(n-m,k)), T(n,n)=1. - _Vladimir Kruchinin_, Apr 01 2015

%e On 4 vertices, there are:

%e 24 rooted trees X-O-O-O

%e 12 rooted trees X-O-O

%e \

%e O

%e 4 rooted trees X

%e /|\

%e O O O

%p p:= proc(i) p(i):= `if`(i=1, x, x*(exp(p(i-1))-1)) end:

%p s:= proc(n) s(n):= `if`(n=0, 0, s(n-1)+p(n)) end:

%p a:= n-> n! * coeff(series(s(n), x, n+1), x, n):

%p seq(a(n), n=1..25); # _Alois P. Heinz_, Feb 26 2014

%t T[n_, n_] = 1; T[n_, m_] := T[n, m] = n!/(n-m)!*Sum[StirlingS2[k, m]*T[n-m, k], {k, 1, n-m}]; a[n_] := T[n, 1]; Array[a, 25] (* _Jean-François Alcover_, Jan 08 2016, after _Vladimir Kruchinin_ *)

%o (Sage)

%o x = QQ[['x']].gen()

%o P = {}

%o N = 20

%o P[1] = x.O(N)

%o for i in range(2, N):

%o P[i] = x*(P[i-1].exp(N)-1)

%o add(P[u] for u in P)

%o (Maxima)

%o T(n,m):=if n=m then 1 else n!/(n-m)!*sum(stirling2(k,m)*T(n-m,k),k,1,n-m);

%o makelist(T(n,1),n,1,15); /* _Vladimir Kruchinin_, Apr 01 2015 */

%Y Cf. A048816 for the unlabeled version.

%K nonn

%O 1,2

%A _F. Chapoton_, Feb 25 2014