login
Expansion of e.g.f. (exp(x)-1)^2*(x+x^2/2).
0

%I #12 Feb 26 2023 17:23:12

%S 0,0,0,6,36,130,390,1064,2744,6822,16530,39292,92004,212810,487214,

%T 1105680,2490096,5570254,12385962,27393668,60292700,132120114,

%U 288357894,627047896,1358953896,2936012150,6325009730,13589544204,29125246164,62277024922,132875549790,282930969632,601295420384

%N Expansion of e.g.f. (exp(x)-1)^2*(x+x^2/2).

%C 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.

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (9,-33,63,-66,36,-8).

%F a(n) = n*2^(n-1) + binomial(n,2)*(2^(n-2)-2) - 2*n, n >= 3, a(n) = 0 otherwise.

%e a(5)=130 since the set partitions are the following:

%e 20 of the form {1,2,3}, {4}, {5};

%e 20 of the form {1}, {2,3,4}, {5};

%e 30 of the form {1,2}, {3,4}, {5};

%e 30 of the form {1,2}, {3}, {4,5};

%e 30 of the form {1}, {2,3}, {4,5}.

%o (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

%K nonn,easy

%O 0,4

%A _Enrique Navarrete_, Feb 12 2023