login
Total number of blocks in all partitions of [n] where each block has at least one odd element and at least one even element.
1

%I #29 Jun 05 2023 14:53:07

%S 0,0,1,1,5,13,55,193,941,4081,22351,113761,694565,4030153,27107095,

%T 175738753,1289775821,9209233921,73147903471,568928274961,

%U 4857161139365,40796613003433,372190216061335,3352314486348433,32518958606637101,312271731474218881

%N Total number of blocks in all partitions of [n] where each block has at least one odd element and at least one even element.

%C All positive terms are odd.

%H Alois P. Heinz, <a href="/A363472/b363472.txt">Table of n, a(n) for n = 0..580</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>

%F a(n) = Sum_{k=0..floor(n/2)} k * Stirling2(floor(n/2),k) * Stirling2(ceiling(n/2),k) * k!.

%e a(2) = 1: 12.

%e a(3) = 1: 123.

%e a(4) = 5 = 1 + 2 + 2: 1234, 12|34, 14|23.

%e a(5) = 13 = 1 + 2 + 2 + 2 + 2 + 2 + 2: 12345, 123|45, 125|34, 12|345, 134|25, 145|23, 14|235.

%p a:= n-> (h-> add(k*Stirling2(h, k)*Stirling2(n-h, k)*k!, k=0..h))(floor(n/2)):

%p seq(a(n), n=0..30);

%Y Cf. A124425, A362495, A363454.

%K nonn

%O 0,5

%A _Alois P. Heinz_, Jun 05 2023