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.

Showing 1-2 of 2 results.

A301957 Number of distinct subset-products of the integer partition with Heinz number n.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 4, 1, 2, 3, 2, 2, 4, 2, 2, 2, 3, 2, 4, 2, 2, 4, 2, 1, 4, 2, 4, 3, 2, 2, 4, 2, 2, 4, 2, 2, 6, 2, 2, 2, 3, 3, 4, 2, 2, 4, 4, 2, 4, 2, 2, 4, 2, 2, 5, 1, 4, 4, 2, 2, 4, 4, 2, 3, 2, 2, 6, 2, 4, 4, 2, 2, 5, 2, 2, 4, 4, 2, 4, 2, 2, 6, 4, 2, 4, 2, 4, 2, 2, 3, 6, 3, 2, 4, 2, 2, 8
Offset: 1

Views

Author

Gus Wiseman, Mar 29 2018

Keywords

Comments

A subset-product of an integer partition y is a product of some submultiset of y. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Number of distinct values obtained when A003963 is applied to all divisors of n. - Antti Karttunen, Sep 05 2018

Examples

			The distinct subset-products of (4,2,1,1) are 1, 2, 4, and 8, so a(84) = 4.
The distinct subset-products of (6,3,2) are 1, 2, 3, 6, 12, 18, and 36, so a(195) = 7.
		

Crossrefs

Programs

  • Mathematica
    Table[If[n===1,1,Length[Union[Times@@@Subsets[Join@@Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]]],{n,100}]
  • PARI
    up_to = 65537;
    A003963(n) = { n=factor(n); n[, 1]=apply(primepi, n[, 1]); factorback(n) }; \\ From A003963
    v003963 = vector(up_to,n,A003963(n));
    A301957(n) = { my(m=Map(),s,k=0,c); fordiv(n,d,if(!mapisdefined(m,s = v003963[d],&c), mapput(m,s,s); k++)); (k); }; \\ Antti Karttunen, Sep 05 2018

Extensions

More terms from Antti Karttunen, Sep 05 2018

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

Original entry on oeis.org

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
Offset: 1

Views

Author

Gus Wiseman, Mar 30 2018

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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}]
  • 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

Formula

a(n) = A299701(n) - A301957(n).
Showing 1-2 of 2 results.