OFFSET
0,3
FORMULA
a(n) = 2^n-A365377(n). - Chai Wah Wu, Sep 09 2023
EXAMPLE
The a(1) = 1 through a(4) = 10 sets:
{1} {2} {3} {4}
{1,2} {1,2} {1,3}
{1,3} {1,4}
{2,3} {2,4}
{1,2,3} {3,4}
{1,2,3}
{1,2,4}
{1,3,4}
{2,3,4}
{1,2,3,4}
MATHEMATICA
Table[Length[Select[Subsets[Range[n]], MemberQ[Total/@Subsets[#], n]&]], {n, 0, 10}]
PROG
(PARI) isok(s, n) = forsubset(#s, ss, if (vecsum(vector(#ss, k, s[ss[k]])) == n, return(1)));
a(n) = my(nb=0); forsubset(n, s, if (isok(s, n), nb++)); nb; \\ Michel Marcus, Sep 09 2023
(Python)
from itertools import combinations, chain
from sympy.utilities.iterables import partitions
def A365376(n):
if n == 0: return 1
nset = set(range(1, n+1))
s, c = [set(p) for p in partitions(n, m=n, k=n) if max(p.values(), default=1) == 1], 1
for a in chain.from_iterable(combinations(nset, m) for m in range(2, n+1)):
if sum(a) >= n:
aset = set(a)
for p in s:
if p.issubset(aset):
c += 1
break
return c # Chai Wah Wu, Sep 09 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 08 2023
EXTENSIONS
a(16)-a(25) from Michel Marcus, Sep 09 2023
a(26)-a(32) from Chai Wah Wu, Sep 09 2023
a(33)-a(35) from Chai Wah Wu, Sep 10 2023
STATUS
approved