OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..200
FORMULA
a(n) = sum(d divides n, n!/(n/d)!*(d^(d-1)/d!)^(n/d) ).
E.g.f.: sum(k>=1, exp(k^(k-1)*x^k/k!)).
EXAMPLE
For n = 3 we have the following 10 forests (where the roots are denoted by ^):
3 2 3 1 2 1
| | | | | |
2 3 1 3 1 2 2 3 1 3 1 2
\ / \ / \ / | | | | | |
1 2 3 1 2 3 1 1 2 2 3 3
^ ^ ^, ^, ^, ^, ^, ^, ^, ^, ^, ^
MATHEMATICA
Table[Sum[n!/(n/d)!*(d^(d-1)/d!)^(n/d), {d, Divisors[n]}], {n, 1, 100}]
PROG
(Maxima) a(n):= lsum(n!/(n/d)!*(d^(d-1)/d!)^(n/d), d, listify(divisors(n))); makelist(a(n), n, 1, 40); /* Emanuele Munarini, Feb 03 2014 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Emanuele Munarini, Jan 30 2014
STATUS
approved