%I #20 Mar 25 2021 10:21:22
%S 1,0,4,4,31,86,449,1968,10420,56582,333235,2069772,13606113,94065232,
%T 682242552,5175100432,40954340995,337362555010,2886922399649,
%U 25616738519384,235313456176512,2234350827008170,21899832049913999,221292603495494488,2302631998398438321
%N Number of partitions of an n-set with an odd number of blocks of size 1.
%H Alois P. Heinz, <a href="/A111723/b111723.txt">Table of n, a(n) for n = 1..576</a>
%F E.g.f.: sinh(x)*exp(exp(x)-1-x).
%F More generally, e.g.f. for number of partitions of an n-set with an odd number of blocks of size k is sinh(x^k/k!)*exp(exp(x)-1-x^k/k!).
%p b:= proc(n, t) option remember; `if`(n=0, t, add(b(n-j,
%p `if`(j=1, 1-t, t))*binomial(n-1, j-1), j=1..n))
%p end:
%p a:= n-> b(n, 0):
%p seq(a(n), n=1..30); # _Alois P. Heinz_, May 10 2016
%t Rest[ Range[0, 23]! CoefficientList[ Series[ Sinh[x]Exp[Exp[x] - 1 - x], {x, 0, 23}], x]] (* _Robert G. Wilson v_ *)
%o (Python)
%o from sympy.core.cache import cacheit
%o from sympy import binomial
%o @cacheit
%o def b(n, t):
%o return t if n==0 else sum(b(n - j, (1 - t if j==1 else t))*binomial(n - 1, j - 1) for j in range(1, n + 1))
%o def a(n):
%o return b(n, 0)
%o print([a(n) for n in range(1, 51)]) # _Indranil Ghosh_, Aug 10 2017
%Y Cf. A097514, A113235, A063083, A062282, A111724, A111752, A111753.
%K easy,nonn
%O 1,3
%A _Vladeta Jovovic_, Nov 17 2005
%E More terms from _Robert G. Wilson v_, Nov 22 2005