A290383 Number of set partitions of [n] such that the smallest element of each block is odd.
1, 1, 1, 2, 3, 8, 17, 56, 151, 584, 1893, 8360, 31499, 155720, 666169, 3633704, 17351967, 103284296, 543441005, 3499082408, 20079329875, 138860069192, 861908850561, 6364334129192, 42439075349543, 332934707138888, 2371469004695797, 19681714722718376
Offset: 0
Keywords
Examples
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.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..607
- Wikipedia, Partition of a set
Programs
-
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 *)
Comments