OFFSET
1,4
COMMENTS
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). A subset-sum (or subset-product) of a multiset y is any number equal to the sum (or product) of some submultiset of y.
First negative entry is a(165) = -1.
This sequence is unbounded above and below.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..100000
EXAMPLE
The distinct subset-sums of (4,2,1,1) are 0, 1, 2, 3, 4, 5, 6, 7, 8, while the distinct subset-products are 1, 2, 4, 8, so a(84) = 9 - 4 = 5.
The distinct subset-sums of (5,3,2) are 0, 2, 3, 5, 7, 8, 10, while the distinct subset-products are 1, 2, 3, 5, 6, 10, 15, 30, so a(165) = 7 - 8 = -1.
MATHEMATICA
Table[With[{ptn=If[n===1, {}, Join@@Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]}, Length[Union[Plus@@@Subsets[ptn]]]-Length[Union[Times@@@Subsets[ptn]]]], {n, 100}]
PROG
CROSSREFS
KEYWORD
sign
AUTHOR
Gus Wiseman, Mar 30 2018
STATUS
approved