A096648 Number of partitions of an n-set with odd number of even blocks.
0, 1, 3, 7, 25, 106, 434, 2045, 10707, 57781, 338195, 2115664, 13796952, 95394573, 692462671, 5235101739, 41436754261, 341177640610, 2915100624274, 25866987547865, 237448494222575, 2252995117706961, 22078799199129799, 222971522853648704, 2319210969809731600
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..500
Programs
-
Maple
with(combinat): b:= proc(n, i, t) option remember; `if`(n=0, t, `if`(i<1, 0, add(multinomial(n, n-i*j, i$j)/j!*b(n-i*j, i-1, irem(t+`if`(irem(i, 2)=0, j, 0), 2)), j=0..n/i))) end: a:= n-> b(n$2, 0): seq(a(n), n=1..30); # Alois P. Heinz, Mar 08 2015
-
Mathematica
multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_, t_] := b[n, i, t] = If[n == 0, t, If[i<1, 0, Sum[multinomial[n, Join[{n-i*j}, Array[i&, j]]]/j!*b[n-i*j, i-1, Mod[t+If[Mod[i, 2] == 0, j, 0], 2]], {j, 0, n/i}]]]; a[n_] := b[n, n, 2]; Table[ a[n], {n, 1, 30}] (* Jean-François Alcover, May 13 2015, after Alois P. Heinz *) With[{nn=30},Rest[CoefficientList[Series[Exp[Sinh[x]]Sinh[Cosh[x]-1], {x,0,nn}],x] Range[0,nn]!]] (* Harvey P. Dale, Sep 03 2016 *)
Formula
E.g.f.: exp(sinh(x))*sinh(cosh(x)-1).
a(n) = sum{k=0..n, if(mod(n-k,2)=1, A048993(n,k), 0)}. - Paul Barry, May 19 2006
Extensions
More terms from Emeric Deutsch, Nov 16 2004