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.
EXAMPLE
The a(1) = 1 through a(8) = 6 partitions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (32) (33) (43) (44)
(1111) (11111) (222) (52) (53)
(111111) (322) (332)
(1111111) (2222)
(11111111)
The a(11) = 17 partitions:
(11) (9,2) (7,2,2) (5,3,2,1) (4,3,2,1,1) (1,1,1,1,1,1,1,1,1,1,1)
(8,3) (6,3,2) (5,2,2,2) (3,2,2,2,2)
(7,4) (5,4,2) (4,3,2,2)
(6,5) (5,3,3) (3,3,3,2)
(4,4,3)
MATHEMATICA
combp[n_, y_]:=With[{s=Table[{k, i}, {k, y}, {i, 1, Floor[n/k]}]}, Select[Tuples[s], Total[Times@@@#]==n&]];
Table[Length[Select[Union/@IntegerPartitions[n], Function[ptn, !Or@@Table[combp[ptn[[k]], Delete[ptn, k]]!={}, {k, Length[ptn]}]]@*Union]], {n, 0, 15}]
PROG
(Python)
from sympy.utilities.iterables import partitions
def A365072(n):
if n <= 1: return 1
alist = [set(tuple(sorted(set(p))) for p in partitions(i)) for i in range(n)]
c = 1
for p in partitions(n, k=n-1):
s = set(p)
for q in s:
if tuple(sorted(s-{q})) in alist[q]:
break
else:
c += 1
return c # Chai Wah Wu, Sep 20 2023
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 31 2023
EXTENSIONS
a(31)-a(49) from Chai Wah Wu, Sep 20 2023
STATUS
approved