OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..200
FORMULA
E.g.f.: Sum_{i>=1} P_i with P_1 = x and P_i = x * (exp(P_{i-1})-1) for i>1.
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
EXAMPLE
On 4 vertices, there are:
24 rooted trees X-O-O-O
12 rooted trees X-O-O
\
O
4 rooted trees X
/|\
O O O
MAPLE
p:= proc(i) p(i):= `if`(i=1, x, x*(exp(p(i-1))-1)) end:
s:= proc(n) s(n):= `if`(n=0, 0, s(n-1)+p(n)) end:
a:= n-> n! * coeff(series(s(n), x, n+1), x, n):
seq(a(n), n=1..25); # Alois P. Heinz, Feb 26 2014
MATHEMATICA
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 *)
PROG
(Sage)
x = QQ[['x']].gen()
P = {}
N = 20
P[1] = x.O(N)
for i in range(2, N):
P[i] = x*(P[i-1].exp(N)-1)
add(P[u] for u in P)
(Maxima)
T(n, m):=if n=m then 1 else n!/(n-m)!*sum(stirling2(k, m)*T(n-m, k), k, 1, n-m);
makelist(T(n, 1), n, 1, 15); /* Vladimir Kruchinin, Apr 01 2015 */
CROSSREFS
KEYWORD
nonn
AUTHOR
F. Chapoton, Feb 25 2014
STATUS
approved