login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A363587
Number of partitions of [n] such that in the set of smallest block elements there is an equal number of odd and even terms.
1
1, 0, 1, 2, 6, 16, 63, 246, 1201, 5632, 30776, 166800, 1032537, 6404960, 44200745, 305485130, 2305218366, 17475547664, 143075155975, 1179769331662, 10409877747841, 92570178170528, 873953428860952, 8318955989166944, 83562716138732321, 846729015766650672
OFFSET
0,4
LINKS
EXAMPLE
a(0) = 1: () the empty partition.
a(1) = 0.
a(2) = 1: 1|2.
a(3) = 2: 13|2, 1|23.
a(4) = 6: 123|4, 134|2, 13|24, 14|23, 1|234, 1|2|3|4.
a(5) = 16: 1235|4, 123|45, 1345|2, 134|25, 135|24, 13|245, 13|2|4|5, 145|23, 14|235, 15|234, 1|2345, 1|23|4|5, 15|2|3|4, 1|25|3|4, 1|2|35|4, 1|2|3|45.
MAPLE
b:= proc(n, x, y) option remember; `if`(abs(x-y)>2*n, 0,
`if`(n=0, 1, `if`(y=0, 0, b(n-1, y-1, x+1)*y)+
b(n-1, y, x)*x + b(n-1, y, x+1)))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..30);
MATHEMATICA
b[n_, x_, y_] := b[n, x, y] = If[Abs[x - y] > 2n, 0, If[n == 0, 1, If[y == 0, 0, b[n-1, y-1, x+1]*y] + b[n-1, y, x]*x + b[n-1, y, x+1]]];
a[n_] := b[n, 0, 0];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 18 2023, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A150031 A121753 A173994 * A150032 A373452 A283420
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 10 2023
STATUS
approved