login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A360588
Expansion of e.g.f. (exp(x)-1)^2*(x+x^2/2).
0
0, 0, 0, 6, 36, 130, 390, 1064, 2744, 6822, 16530, 39292, 92004, 212810, 487214, 1105680, 2490096, 5570254, 12385962, 27393668, 60292700, 132120114, 288357894, 627047896, 1358953896, 2936012150, 6325009730, 13589544204, 29125246164, 62277024922, 132875549790, 282930969632, 601295420384
OFFSET
0,4
COMMENTS
a(n) is the number of ordered set partitions of an n-set into 3 sets such that the first and second sets contain at least one element and the third set contains either one or two elements.
FORMULA
a(n) = n*2^(n-1) + binomial(n,2)*(2^(n-2)-2) - 2*n, n >= 3, a(n) = 0 otherwise.
EXAMPLE
a(5)=130 since the set partitions are the following:
20 of the form {1,2,3}, {4}, {5};
20 of the form {1}, {2,3,4}, {5};
30 of the form {1,2}, {3,4}, {5};
30 of the form {1,2}, {3}, {4,5};
30 of the form {1}, {2,3}, {4,5}.
PROG
(PARI) a(n) = if (n>=3, n*2^(n-1) + binomial(n, 2)*(2^(n-2)-2) - 2*n, 0); \\ Michel Marcus, Feb 13 2023
CROSSREFS
Sequence in context: A253945 A331576 A056375 * A321579 A364429 A018214
KEYWORD
nonn,easy
AUTHOR
Enrique Navarrete, Feb 12 2023
STATUS
approved