OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..165
Wikipedia, Partition of a set
FORMULA
a(n) mod 2 = A059841(n).
EXAMPLE
a(0) = 1: () the empty partition.
a(1) = 0.
a(2) = 1: 12.
a(3) = 0.
a(4) = 3: 1234, 12|34, 14|23.
a(5) = 2: 134|25, 14|235.
a(6) = 17: 123456, 1234|56, 1236|45, 124|356, 1256|34, 12|3456, 12|34|56, 12|36|45, 1346|25, 136|245, 1456|23, 146|235, 14|23|56, 16|2345, 16|23|45, 14|25|36, 16|25|34.
a(7) = 28: 12356|47, 1236|457, 12|356|47, 12|36|457, 13456|27, 1346|257, 134|2567, 134|25|67, 134|27|56, 1356|247, 136|2457, 136|25|47, 136|27|45, 1456|237, 146|2357, 14|23567, 14|235|67, 14|237|56, 156|2347, 16|23457, 156|23|47, 16|235|47, 16|237|45, 16|23|457, 14|257|36, 14|27|356, 156|27|34, 16|257|34.
MAPLE
b:= proc(n, x, y, u, v) option remember; `if`(x+v>n, 0, `if`(n=0, 1,
`if`(y=0, 0, b(n-1, v, u, y-1, x+1)*y)+b(n-1, v, u, y, x+1)+
`if`(v=0, 0, b(n-1, v-1, u+1, y, x)*v)+b(n-1, v, u, y, x)*(u+x)))
end:
a:= n-> b(n, 0$4):
seq(a(n), n=0..30);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 12 2023
STATUS
approved