OFFSET
0,4
COMMENTS
LINKS
Steven R. Finch, Monoids of natural numbers, March 17, 2009.
EXAMPLE
The set {3,4,5,17} has 17 = 1*3 + 1*4 + 2*5, so is counted under a(17).
The a(0) = 0 through a(5) = 20 subsets:
. . {1,2} {1,2} {1,2} {1,2}
{1,3} {1,3} {1,3}
{1,2,3} {1,4} {1,4}
{2,4} {1,5}
{1,2,3} {2,4}
{1,2,4} {1,2,3}
{1,3,4} {1,2,4}
{2,3,4} {1,2,5}
{1,2,3,4} {1,3,4}
{1,3,5}
{1,4,5}
{2,3,4}
{2,3,5}
{2,4,5}
{1,2,3,4}
{1,2,3,5}
{1,2,4,5}
{1,3,4,5}
{2,3,4,5}
{1,2,3,4,5}
MATHEMATICA
combs[n_, y_]:=With[{s=Table[{k, i}, {k, y}, {i, 0, Floor[n/k]}]}, Select[Tuples[s], Total[Times@@@#]==n&]];
Table[Length[Select[Subsets[Range[n]], Or@@Table[combs[#[[k]], Delete[#, k]]!={}, {k, Length[#]}]&]], {n, 0, 10}]
PROG
(Python)
from itertools import combinations
from sympy.utilities.iterables import partitions
def A364914(n):
c, mlist = 0, []
for m in range(1, n+1):
t = set()
for p in partitions(m, k=m-1):
t.add(tuple(sorted(p.keys())))
mlist.append([set(d) for d in t])
for k in range(2, n+1):
for w in combinations(range(1, n+1), k):
ws = set(w)
for d in w:
for s in mlist[d-1]:
if s <= ws:
c += 1
break
else:
continue
break
return c # Chai Wah Wu, Nov 17 2023
CROSSREFS
The binary complement is A007865.
The binary version without re-usable parts is A088809.
The binary version is A093971.
The complement without re-usable parts is A151897.
The complement is counted by A326083.
The version without re-usable parts is A364534.
The version for partitions is A364913.
First differences are A365046.
KEYWORD
nonn,changed
AUTHOR
Gus Wiseman, Aug 17 2023
EXTENSIONS
a(12)-a(34) from Chai Wah Wu, Nov 17 2023
STATUS
approved