OFFSET
0,3
COMMENTS
a(n) is the number of ways to choose a function f:{1,2,...,n}->{1,2,...,n} and then linearly order the blocks of the coimage of f. - Geoffrey Critzer, Dec 23 2011
REFERENCES
Paolo Hägler, Il problema dei pasti, Bollettino dei docenti di matematica, 63 (2011), 101-108
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
FORMULA
a(n) = Sum_{k=0..n} Sum_{j=0..k} (-1)^(k-j)*j^n*n!/(n-k)!*k!/(j!*(k-j)!). Paolo Hägler, Feb 20 2011
a(n) = Sum_{k=0..n} C(n,k)*Stirling2(n,k)*k!^2.
a(n) = Sum_{k=0..n} A090657(n,k)*k!.
EXAMPLE
For n=2 the a(2)=6 solutions are Aab, Bab, AaBb, AbBa, BbAa, BaAb. The capital letters are the vertices of V_2, in order, and the lower-case letters are the vertices of V_1 joined to the vertex of V_2 represented by the capital letter.
MAPLE
f:= n-> add(add((-1)^(i-j)*j^n*n!*i!/(j!*(i-j)!*(n-i)!), j=0..i), i=0..n);
[seq(f(n), n=0..20)]; # N. J. A. Sloane, Mar 08 2011
MATHEMATICA
Table[Sum[Binomial[n, k] StirlingS2[n, k] k!^2, {k, 0, n}], {n, 0, 20}] (* Geoffrey Critzer, Dec 23 2011 *)
PROG
(PARI) a(n) = sum(k=0, n, binomial(n, k)*stirling(n, k, 2)*k!^2); \\ Michel Marcus, Mar 23 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo Hägler, Feb 20 2011
STATUS
approved