OFFSET
0,2
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..300
MATHEMATICA
terms = m = 30;
a094577[n_] := Sum[Binomial[n, k]*BellB[2n-k], {k, 0, n}];
egf = Exp[(1 - Exp[x])/2]*Sum[a094577[n]*(x/2)^n/n!, {n, 0, m}] + O[x]^m;
A094574 = CoefficientList[egf + O[x]^m, x]*Range[0, m-1]!;
a[n_] := Sum[Binomial[n, k]*A094574[[k+1]], {k, 0, n}];
Table[a[n], {n, 0, m-1}] (* Jean-François Alcover, May 24 2019 *)
PROG
(Python)
def powerSet(k): return [toBinary(n, k) for n in range(1, 2**k)]
def courcelle(maxUses, remainingSets, exact=False):
if exact and not all(maxUses<=sum(remainingSets)): ans=0
elif len(remainingSets)==0: ans=1
else:
set0=remainingSets[0]
if all(set0<=maxUses): ans=courcelle(maxUses-set0, remainingSets[1:], exact=exact)
else: ans=0
ans+=courcelle(maxUses, remainingSets[1:], exact=exact)
return ans
for i in range(10):
print(i, courcelle(array([2]*i), powerSet(i), exact=False))
CROSSREFS
KEYWORD
nonn
AUTHOR
Daniel E. Loeb, Dec 16 2010
EXTENSIONS
Edited and corrected by Max Alekseyev, Dec 19 2010
STATUS
approved