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.

A301979 Number of subset-sums minus number of subset-products of the integer partition with Heinz number n.

This page as a plain text file.
%I A301979 #16 Nov 09 2018 21:43:36
%S A301979 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,
%T A301979 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,
%U A301979 0,3,0,5,0,2,0,4,0,4,0,6,0,2,0,5,0,2,0
%N A301979 Number of subset-sums minus number of subset-products of the integer partition with Heinz number n.
%C A301979 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.
%C A301979 First negative entry is a(165) = -1.
%C A301979 This sequence is unbounded above and below.
%H A301979 Antti Karttunen, <a href="/A301979/b301979.txt">Table of n, a(n) for n = 1..16384</a>
%H A301979 Antti Karttunen, <a href="/A301979/a301979.txt">Data supplement: n, a(n) computed for n = 1..100000</a>
%F A301979 a(n) = A299701(n) - A301957(n).
%e A301979 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.
%e A301979 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.
%t A301979 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}]
%o A301979 (PARI)
%o A301979 A003963(n) = {n=factor(n); n[, 1]=apply(primepi, n[, 1]); factorback(n)};
%o A301979 A301957(n) = {my(ds = divisors(n)); for(i=1,#ds,ds[i] = A003963(ds[i])); #Set(ds)};
%o A301979 A056239(n) = if(1==n,0,my(f=factor(n)); sum(i=1, #f~, f[i,2] * primepi(f[i,1])));
%o A301979 A299701(n) = {my(ds = divisors(n)); for(i=1,#ds,ds[i] = A056239(ds[i])); #Set(ds)};
%o A301979 A301979(n) = (A299701(n) - A301957(n)); \\ _Antti Karttunen_, Oct 07 2018
%Y A301979 Cf. A000712, A003963, A056239, A108917, A276024, A284640, A296150, A299701, A301854, A301855, A301856, A301957, A301970.
%K A301979 sign
%O A301979 1,4
%A A301979 _Gus Wiseman_, Mar 30 2018