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.

A299702 Heinz numbers of knapsack partitions.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 64, 65, 66, 67, 68, 69, 71, 73, 74, 75, 76, 77, 78
Offset: 1

Views

Author

Gus Wiseman, Feb 17 2018

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Crossrefs

Programs

  • Maple
    filter:= proc(n) local F,t,S,i,r;
      F:= map(t -> [numtheory:-pi(t[1]),t[2]], ifactors(n)[2]);
      S:= {0}: r:= 1;
      for t in F do
       S:= map(s -> seq(s + i*t[1],i=0..t[2]),S);
       r:= r*(t[2]+1);
       if nops(S) <> r then return false fi
      od;
      true
    end proc:
    select(filter, [$1..100]); # Robert Israel, Oct 30 2024
  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],UnsameQ@@Plus@@@Union[Rest@Subsets[primeMS[#]]]&]