cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A385675 For positive integers n, a multiset A of positive integers is called "n-good" if for any number 1 <= i <= n, we can find a submultiset B of A such that the sum of B is equal to i. a(n) is the number of minimal n-good multisets.

Original entry on oeis.org

1, 2, 3, 7, 9, 18, 27, 47, 62, 101, 140, 226, 301, 437, 579, 838, 1077, 1525, 1985, 2721, 3470, 4674, 5899, 7843, 9773, 12703, 15803, 20431, 25129, 32167, 39519, 49982, 60928, 76373, 92537, 115313, 138969, 171372, 205847, 252604, 301444, 367890, 438145, 531202, 630209
Offset: 1

Views

Author

Yifan Xie, Aug 05 2025

Keywords

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

Examples

			For n = 6, {1, 2, 3} and {1, 1, 3, 6} are minimal n-good multisets.
		

Crossrefs

Cf. A126796.

Programs

  • 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