login
A363451
Number of partitions of [n] such that the number of blocks containing only odd elements equals the number of blocks containing only even elements.
4
1, 0, 2, 2, 9, 23, 99, 353, 1778, 7927, 45273, 238797, 1526331, 9215950, 65020448, 439742641, 3388075807, 25270974635, 210763775071, 1713657668021, 15359474721088, 134902169999841, 1291589459223627, 12165062702520422, 123780591852786693, 1242763745129587332
OFFSET
0,3
LINKS
EXAMPLE
a(0) = 1: () the empty partition.
a(1) = 0.
a(2) = 2: 12, 1|2.
a(3) = 2: 123, 13|2.
a(4) = 9: 1234, 12|34, 12|3|4, 13|24, 14|23, 1|23|4, 14|2|3, 1|2|34, 1|2|3|4.
a(5) = 23: 12345, 123|45, 123|4|5, 125|34, 12|345, 125|3|4, 12|35|4, 134|25, 134|2|5, 135|24, 13|25|4, 13|2|45, 13|2|4|5, 145|23, 14|235, 15|23|4, 1|235|4, 145|2|3, 14|2|35, 15|2|34, 1|2|345, 15|2|3|4, 1|2|35|4.
MAPLE
b:= proc(n, x, y, m) option remember; `if`(n=0, `if`(x=y, 1, 0),
`if`(x+m>0, b(n-1, y, x, m)*(x+m), 0)+b(n-1, y, x+1, m)+
`if`(y>0, b(n-1, y-1, x, m+1)*y, 0))
end:
a:= n-> b(n, 0$3):
seq(a(n), n=0..28);
MATHEMATICA
b[n_, x_, y_, m_] := b[n, x, y, m] = If[n == 0, If[x == y, 1, 0], If[x + m > 0, b[n - 1, y, x, m]*(x + m), 0] + b[n - 1, y, x + 1, m] + If[y > 0, b[n - 1, y - 1, x, m + 1]*y, 0]];
a[n_] := b[n, 0, 0, 0];
Table[a[n], {n, 0, 28}] (* Jean-François Alcover, Oct 20 2023, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 02 2023
STATUS
approved