A096647 Number of partitions of an n-set with even number of even blocks.
1, 1, 1, 2, 8, 27, 97, 443, 2095, 10440, 58194, 340375, 2097933, 13847485, 95504749, 690495874, 5245040408, 41428115543, 340899165549, 2917641580783, 25857170687507, 237421321934176, 2253720620740362, 22073206655954547, 222987346441156585, 2319379362420267753
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..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, 1): seq(a(n), n=0..30); # Alois P. Heinz, Mar 08 2015
-
Mathematica
a[n_] := Sum[If[Mod[n-k, 2] == 0, StirlingS2[n, k], 0], {k, 0, n}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 16 2015, after Paul Barry *)
Formula
E.g.f.: exp(sinh(x))*cosh(cosh(x)-1).
a(n) = sum{k=0..n, if(mod(n-k,2)=0, A048993(n,k), 0)}. - Paul Barry, May 19 2006
Extensions
More terms from Emeric Deutsch, Nov 16 2004
Comments