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.

Previous Showing 11-12 of 12 results.

A304795 Number of positive special sums of the integer partition with Heinz number n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 18 2018

Keywords

Comments

A positive special sum of y is a number n > 0 such that exactly one submultiset of y sums to n. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The a(36) = 4 special sums are 1, 3, 5, 6, corresponding to the submultisets (1), (21), (221), (2211), with Heinz numbers 2, 6, 18, 36.
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    uqsubs[y_]:=Join@@Select[GatherBy[Union[Rest[Subsets[y]]],Total],Length[#]===1&];
    Table[Length[uqsubs[primeMS[n]]],{n,100}]
  • PARI
    up_to = 65537;
    A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * primepi(f[i,1]))); }
    v056239 = vector(up_to,n,A056239(n));
    A304795(n) = { my(m=Map(),s,k=0,c); fordiv(n,d,if(!mapisdefined(m,s = v056239[d],&c), mapput(m,s,1), mapput(m,s,c+1))); sumdiv(n,d,(1==mapget(m,v056239[d])))-1; }; \\ Antti Karttunen, Jul 02 2018

Extensions

More terms from Antti Karttunen, Jul 02 2018

A305613 Numbers whose multiset of prime factors is not knapsack.

Original entry on oeis.org

30, 60, 70, 72, 84, 90, 120, 140, 144, 150, 168, 180, 210, 216, 240, 252, 270, 280, 286, 288, 300, 308, 330, 336, 350, 360, 378, 390, 420, 432, 440, 450, 480, 490, 495, 504, 510, 525, 528, 540, 560, 570, 572, 576, 588, 594, 600, 616, 630, 646, 648, 660, 672
Offset: 1

Views

Author

Gus Wiseman, Jun 06 2018

Keywords

Comments

A multiset of positive integers is knapsack if every distinct submultiset has a different sum.

Examples

			30 = 2 * 3 * 5 is not knapsack because 2 + 3 = 5.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],DivisorSigma[0,#]=!=Length[Union[Total/@Subsets[Join@@Cases[FactorInteger[#],{p_,k_}:>Table[p,{k}]]]]]&]
Previous Showing 11-12 of 12 results.