OFFSET
0,2
REFERENCES
D. E. Knuth: The Art of Computer Programming, Volume 4, Generating All Combinations and Partitions Fascicle 3, Section 7.2.1.4. Generating all partitions. Page 38, Algorithm H. - Washington Bomfim, Sep 25 2008
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..335
FORMULA
Equals 2^n*A134954(n).
a(n) = Sum of n!prod_{k=1}^n\{ frac{ A134958(k)^{c_k} }{ k!^{c_k} c_k! } } over all the partitions of n, c_1 + 2c_2 + ... + nc_n; c_1, c_2, ..., c_n >= 0. - Washington Bomfim, Sep 25 2008
EXAMPLE
From Gus Wiseman, May 21 2018: (Start)
The a(2) = 8 hyperforests are the following:
{{1},{2},{1,2}}
{{1},{1,2}}
{{2},{1,2}}
{{1,2}}
{{1},{2}}
{{1}}
{{2}}
{}
(End)
MAPLE
with(combinat): p:= proc(n) option remember; add(stirling2(n-1, i) *n^(i-1), i=0..n-1) end: g:= proc(n) option remember; p(n) +add(binomial(n-1, k-1) *p(k) *g(n-k), k=1..n-1) end: a:= n-> `if`(n=0, 1, 2^n * g(n)): seq(a(n), n=0..30); # Alois P. Heinz, Oct 07 2008
MATHEMATICA
p[n_] := p[n] = Sum[ StirlingS2[n-1, i]*n^(i-1), {i, 0, n-1}]; g[n_] := g[n] = p[n] + Sum[Binomial[n-1, k-1]*p[k]*g[n-k], {k, 1, n-1}]; a[n_] := If[n == 0, 1, 2^n* g[n]]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 13 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Don Knuth, Jan 26 2008
STATUS
approved