login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A301979 Number of subset-sums minus number of subset-products of the integer partition with Heinz number n. 5
0, 1, 0, 2, 0, 2, 0, 3, 0, 2, 0, 3, 0, 2, 0, 4, 0, 3, 0, 4, 0, 2, 0, 4, 0, 2, 0, 4, 0, 3, 0, 5, 0, 2, 0, 4, 0, 2, 0, 5, 0, 4, 0, 4, 0, 2, 0, 5, 0, 3, 0, 4, 0, 4, 0, 6, 0, 2, 0, 4, 0, 2, 0, 6, 0, 4, 0, 4, 0, 3, 0, 5, 0, 2, 0, 4, 0, 4, 0, 6, 0, 2, 0, 5, 0, 2, 0 (list; graph; refs; listen; history; text; internal format)
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
FORMULA
a(n) = A299701(n) - A301957(n).
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
(PARI)
A003963(n) = {n=factor(n); n[, 1]=apply(primepi, n[, 1]); factorback(n)};
A301957(n) = {my(ds = divisors(n)); for(i=1, #ds, ds[i] = A003963(ds[i])); #Set(ds)};
A056239(n) = if(1==n, 0, my(f=factor(n)); sum(i=1, #f~, f[i, 2] * primepi(f[i, 1])));
A299701(n) = {my(ds = divisors(n)); for(i=1, #ds, ds[i] = A056239(ds[i])); #Set(ds)};
A301979(n) = (A299701(n) - A301957(n)); \\ Antti Karttunen, Oct 07 2018
CROSSREFS
Sequence in context: A090330 A332447 A132747 * A183063 A318979 A172441
KEYWORD
sign
AUTHOR
Gus Wiseman, Mar 30 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 18 07:20 EDT 2024. Contains 375996 sequences. (Running on oeis4.)