OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..150
Wikipedia, Partition of a set
FORMULA
a(n) mod 2 = A131719(n+1).
EXAMPLE
a(0) = 1: () the empty partition.
a(1) = 1: 1.
a(2) = 1: 1|2.
a(3) = 3: 123, 13|2, 1|2|3.
a(4) = 6: 123|4, 13|24, 13|2|4, 1|234, 1|24|3, 1|2|3|4.
a(5) = 20: 12345, 1235|4, 123|4|5, 1245|3, 125|3|4, 1345|2, 135|24, 13|24|5, 135|2|4, 13|2|4|5, 15|234, 1|234|5, 145|2|3, 15|24|3, 1|24|35, 1|24|3|5, 1|2|345, 15|2|3|4, 1|2|35|4, 1|2|3|4|5.
MAPLE
b:= proc(n, x, y, u, v) option remember; `if`(y+u>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 10 2023
STATUS
approved