OFFSET
0,2
COMMENTS
a(n) is the solution to the following combinatorial problem. Given a set S of n labeled elements, find the number of all subsets of S (2^n) plus the number of partitions of any subset T of S into parts which are not all of size 1 nor of size |T|. This implies that a(n) = 2^n + Sum_{m=3..n} (Bell(m)-2) = Bell(n+1) - 2^n + 1 + n, using the standard recurrence for the Bell numbers (Comtet, Eq. (4a)). - N. J. A. Sloane, Nov 26 2013
REFERENCES
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 210.
FORMULA
Also a(n) = 2^n + Sum_{m=3..n} binomial(n,m)*(Bell(m)-2).
MAPLE
with(combinat); [seq(bell(n+1)-2^n+n+1, n=0..30)];
MATHEMATICA
Table[BellB[n+1]-2^n+n+1, {n, 0, 30}] (* Harvey P. Dale, Apr 24 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jean-Yves Tallet and N. J. A. Sloane, Jan 24 2009
STATUS
approved