OFFSET
0,3
COMMENTS
We consider (for example) that 2x + y + 3z is a positive linear combination of (x,y,z), but 2x + y is not, as the coefficient of z is 0.
LINKS
S. R. Finch, Monoids of natural numbers, March 17, 2009.
EXAMPLE
The set {1,3} has 4 = 1 + 3 so is not counted under a(4). However, 3 cannot be written as a linear combination of {1,3} using all positive coefficients, so it is counted under a(3).
The a(1) = 1 through a(4) = 11 subsets:
{} {} {} {}
{1,2} {2} {3}
{1,3} {1,4}
{2,3} {2,3}
{1,2,3} {2,4}
{3,4}
{1,2,3}
{1,2,4}
{1,3,4}
{2,3,4}
{1,2,3,4}
MAPLE
b:= proc(n, i) option remember; `if`(n=0, {{}}, `if`(i<1, {},
{b(n, i-1)[], seq(map(x->{x[], i}, b(n-i*j, i-1))[], j=1..n/i)}))
end:
a:= n-> 2^n-nops(b(n$2)):
seq(a(n), n=0..33); # Alois P. Heinz, Sep 04 2023
MATHEMATICA
cpu[n_, y_]:=With[{s=Table[{k, i}, {k, Union[y]}, {i, 1, Floor[n/k]}]}, Select[Tuples[s], Total[Times@@@#]==n&]];
Table[Length[Select[Subsets[Range[n]], cpu[n, #]=={}&]], {n, 0, 10}]
PROG
(Python)
from sympy.utilities.iterables import partitions
def A365322(n): return (1<<n)-len({tuple(sorted(set(p))) for p in partitions(n)}) # Chai Wah Wu, Sep 14 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 04 2023
EXTENSIONS
More terms from Alois P. Heinz, Sep 04 2023
STATUS
approved