OFFSET
1,2
COMMENTS
An n-good multiset A is minimal if it is impossible to get another n-good multiset by deleting one element from A.
An n-good multiset must contain 1 and have a sum of elements >= n. - Michael S. Branicky, Aug 13 2025
EXAMPLE
For n = 6, {1, 2, 3} and {1, 1, 3, 6} are minimal n-good multisets.
PROG
(Python) # for illustrative purposes
from functools import cache
from itertools import chain, combinations, combinations_with_replacement as cwr
def f(t): return tuple(e for e in t if e != 0)
def powerset(s): return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))
@cache
def good(n, A): return 1 in A and sum(A) >= n and set(range(1, n+1))-set(sum(B) for B in powerset(A)) == set()
def a(n): return sum(good(n, A) and all(not good(n, A[:i]+A[i+1:]) for i in range(len(A))) for A in map(f, cwr(range(n+1), n)))
print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Aug 13 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Yifan Xie, Aug 05 2025
STATUS
approved
