OFFSET
0,4
COMMENTS
a(n) + n is odd for all n > 1.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..607
Wikipedia, Partition of a set
EXAMPLE
a(3) = 2: 123, 12|3.
a(4) = 3: 1234, 124|3, 12|34.
a(5) = 8: 12345, 1234|5, 1245|3, 124|35, 124|3|5, 125|34, 12|345, 12|34|5.
a(6) = 17: 123456, 12346|5, 1234|56, 12456|3, 1245|36, 1246|35, 124|356, 1246|3|5, 124|36|5, 124|3|56, 1256|34, 125|346, 126|345, 12|3456, 126|34|5, 12|346|5, 12|34|56.
MAPLE
b:= proc(n, m, t) option remember; `if`(n=0, 1,
add(b(n-1, max(m, j), 1-t), j=1..m+1-t))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..30);
# second Maple program:
b:= proc(n, m, t) option remember; `if`(n=0, 1,
`if`(t=0, b(n-1, m+1, 1-t), 0)+m*b(n-1, m, 1-t))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..30); # Alois P. Heinz, Jan 06 2022
MATHEMATICA
b[n_, m_, t_]:=b[n, m, t]=If[n==0, 1, Sum[b[n - 1, Max[m, j], 1 - t], {j, m + 1 - t}]]; Table[b[n, 0, 0], {n, 0, 50}] (* Indranil Ghosh, Jul 29 2017, after Maple code *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 28 2017
STATUS
approved