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 21-30 of 47 results. Next

A319909 Number of distinct positive integers that can be obtained by iteratively adding any two or multiplying any two non-1 parts of an integer partition until only one part remains, starting with 1^n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 4, 5, 10, 15, 21, 34, 49, 68, 101, 142, 197, 280, 387, 538, 751, 1045, 1442, 2010, 2772, 3865, 5339, 7396, 10273, 14201, 19693
Offset: 0

Views

Author

Gus Wiseman, Oct 01 2018

Keywords

Examples

			We have
   7 = 1+1+1+1+1+1+1,
   8 = (1+1)*(1+1+1)+1+1,
   9 = (1+1)*(1+1)*(1+1)+1,
  10 = (1+1+1+1+1)*(1+1),
  12 = (1+1+1)*(1+1+1+1),
so a(7) = 5.
		

Crossrefs

Programs

  • Mathematica
    ReplaceListRepeated[forms_,rerules_]:=Union[Flatten[FixedPointList[Function[pre,Union[Flatten[ReplaceList[#,rerules]&/@pre,1]]],forms],1]];
    mexos[ptn_]:=If[Length[ptn]==0,{0},Union@@Select[ReplaceListRepeated[{Sort[ptn]},{{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x+y]],{foe___,x_?(#>1&),mie___,y_?(#>1&),afe___}:>Sort[Append[{foe,mie,afe},x*y]]}],Length[#]==1&]];
    Table[Length[mexos[Table[1,{n}]]],{n,30}]

A320055 Heinz numbers of sum-product knapsack partitions.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 15, 17, 19, 21, 23, 25, 29, 31, 33, 35, 37, 39, 41, 43, 47, 49, 51, 53, 55, 57, 59, 61, 65, 67, 69, 71, 73, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 107, 109, 111, 113, 115, 119, 121, 123, 127, 129, 131, 133, 137, 139, 141, 143
Offset: 1

Views

Author

Gus Wiseman, Oct 04 2018

Keywords

Comments

A sum-product knapsack partition is a finite multiset m of positive integers such that every sum of products of parts of any multiset partition of any submultiset of m is distinct.
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
Differs from A320056 in having 2, 845, ... and lacking 245, 455, 847, ....

Examples

			A complete list of sums of products of multiset partitions of submultisets of the partition (6,6,3) is:
            0 = 0
          (3) = 3
          (6) = 6
        (3*6) = 18
        (6*6) = 36
      (3*6*6) = 108
      (3)+(6) = 9
    (3)+(6*6) = 39
      (6)+(6) = 12
    (6)+(3*6) = 24
  (3)+(6)+(6) = 15
These are all distinct, and the Heinz number of (6,6,3) is 845, so 845 belongs to the sequence.
		

Crossrefs

Programs

  • Mathematica
    multWt[n_]:=If[n==1,1,Times@@Cases[FactorInteger[n],{p_,k_}:>PrimePi[p]^k]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Select[Range[100],UnsameQ@@Table[Plus@@multWt/@f,{f,Join@@facs/@Divisors[#]}]&]

A320056 Heinz numbers of product-sum knapsack partitions.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 21, 23, 25, 29, 31, 33, 35, 37, 39, 41, 43, 47, 49, 51, 53, 55, 57, 59, 61, 65, 67, 69, 71, 73, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 107, 109, 111, 113, 115, 119, 121, 123, 127, 129, 131, 133, 137, 139, 141, 143
Offset: 1

Views

Author

Gus Wiseman, Oct 04 2018

Keywords

Comments

A product-sum knapsack partition is a finite multiset m of positive integers such that every product of sums of parts of a multiset partition of any submultiset of m is distinct.
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
Differs from A320055 in having 245, 455, 847, ... and lacking 2, 845, ....

Examples

			A complete list of products of sums of multiset partitions of submultisets of the partition (5,5,4) is:
           () = 1
          (4) = 4
          (5) = 5
        (4+5) = 9
        (5+5) = 10
      (4+5+5) = 14
      (4)*(5) = 20
    (4)*(5+5) = 40
      (5)*(5) = 25
    (5)*(4+5) = 45
  (4)*(5)*(5) = 100
These are all distinct, and the Heinz number of (5,5,4) is 847, so 847 belongs to the sequence.
		

Crossrefs

Programs

  • Mathematica
    heinzWt[n_]:=If[n==1,0,Total[Cases[FactorInteger[n],{p_,k_}:>k*PrimePi[p]]]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Select[Range[100],UnsameQ@@Table[Times@@heinzWt/@f,{f,Join@@facs/@Divisors[#]}]&]

A320052 Number of product-sum knapsack partitions of n. Number of integer partitions y of n such that every product of sums of the parts of a multiset partition of any submultiset of y is distinct.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 04 2018

Keywords

Examples

			The sequence of product-sum knapsack partitions begins:
   0: ()
   1:
   2: (2)
   3: (3)
   4: (4)
   5: (5) (3,2)
   6: (6) (4,2) (3,3)
   7: (7) (5,2) (4,3)
   8: (8) (6,2) (5,3) (4,4)
   9: (9) (7,2) (6,3) (5,4)
  10: (10) (8,2) (7,3) (6,4) (5,5) (4,3,3)
  11: (11) (9,2) (8,3) (7,4) (6,5) (5,4,2) (5,3,3) (4,4,3)
  12: (12) (10,2) (9,3) (8,4) (7,5) (7,3,2) (6,6) (4,4,4)
A complete list of all products of sums of multiset partitions of submultisets of (4,3,3) is:
           () = 1
          (3) = 3
          (4) = 4
        (3+3) = 6
        (3+4) = 7
      (3+3+4) = 10
      (3)*(3) = 9
      (3)*(4) = 12
    (3)*(3+4) = 21
    (4)*(3+3) = 24
  (3)*(3)*(4) = 36
These are all distinct, so (4,3,3) is a product-sum knapsack partition of 10.
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};
    sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    rrsuks[n_]:=Select[IntegerPartitions[n],Function[q,UnsameQ@@Apply[Times,Apply[Plus,Union@@mps/@Union[Subsets[q]],{2}],{1}]]];
    Table[Length[rrsuks[n]],{n,12}]

A320053 Number of spanning sum-product knapsack partitions of n. Number of integer partitions y of n such that every sum of products of the parts of a multiset partition of y is distinct.

Original entry on oeis.org

1, 1, 2, 3, 2, 3, 4, 5, 6, 8, 9, 12, 14
Offset: 0

Views

Author

Gus Wiseman, Oct 04 2018

Keywords

Examples

			The sequence of spanning sum-product knapsack partitions begins:
  0: ()
  1: (1)
  2: (2) (1,1)
  3: (3) (2,1) (1,1,1)
  4: (4) (3,1)
  5: (5) (4,1) (3,2)
  6: (6) (5,1) (4,2) (3,3)
  7: (7) (6,1) (5,2) (4,3) (3,3,1)
  8: (8) (7,1) (6,2) (5,3) (4,4) (3,3,2)
  9: (9) (8,1) (7,2) (6,3) (5,4) (4,4,1) (4,3,2) (3,3,3)
A complete list of all sums of products covering the parts of (3,3,3,2) is:
        (2*3*3*3) = 54
      (2)+(3*3*3) = 29
      (3)+(2*3*3) = 21
      (2*3)+(3*3) = 15
    (2)+(3)+(3*3) = 14
    (3)+(3)+(2*3) = 12
  (2)+(3)+(3)+(3) = 11
These are all distinct, so (3,3,3,2) is a spanning sum-product knapsack partition of 11.
An example of a spanning sum-product knapsack partition that is not a spanning product-sum knapsack partition is (5,4,3,2).
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};
    sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    rtuks[n_]:=Select[IntegerPartitions[n],Function[q,UnsameQ@@Apply[Plus,Apply[Times,mps[q],{2}],{1}]]];
    Table[Length[rtuks[n]],{n,8}]

A320054 Number of spanning product-sum knapsack partitions of n. Number of integer partitions y of n such that every product of sums the parts of a multiset partition of y is distinct.

Original entry on oeis.org

1, 1, 2, 3, 2, 4, 5, 8, 10, 12, 16, 17, 25
Offset: 0

Views

Author

Gus Wiseman, Oct 04 2018

Keywords

Examples

			The sequence of spanning product-sum knapsack partitions begins
0: ()
1: (1)
2: (2) (1,1)
3: (3) (2,1) (1,1,1)
4: (4) (3,1)
5: (5) (4,1) (3,2) (3,1,1)
6: (6) (5,1) (4,2) (4,1,1) (3,3)
7: (7) (6,1) (5,2) (5,1,1) (4,3) (4,2,1) (4,1,1,1) (3,3,1)
8: (8) (7,1) (6,2) (6,1,1) (5,3) (5,2,1) (5,1,1,1) (4,4) (4,3,1) (3,3,2)
9: (9) (8,1) (7,2) (7,1,1) (6,3) (6,2,1) (6,1,1,1) (5,4) (5,3,1) (4,4,1) (4,3,2) (3,3,3)
A complete list of all products of sums covering the parts of (4,1,1,1) is:
        (1+1+1+4) = 7
      (1)*(1+1+4) = 6
      (4)*(1+1+1) = 12
      (1+1)*(1+4) = 10
    (1)*(1)*(1+4) = 5
    (1)*(4)*(1+1) = 8
  (1)*(1)*(1)*(4) = 4
These are all distinct, so (4,1,1,1) is a spanning product-sum knapsack partition of 7.
A complete list of all products of sums covering the parts of (5,3,1,1) is:
        (1+1+3+5) = 10
      (1)*(1+3+5) = 9
      (3)*(1+1+5) = 21
      (5)*(1+1+3) = 25
      (1+1)*(3+5) = 16
      (1+3)*(1+5) = 24
    (1)*(1)*(3+5) = 8
    (1)*(3)*(1+5) = 18
    (1)*(5)*(1+3) = 20
    (3)*(5)*(1+1) = 30
  (1)*(1)*(3)*(5) = 15
These are all distinct, so (5,3,1,1) is a spanning product-sum knapsack partition of 10.
An example of a spanning sum-product knapsack partition that is not a spanning product-sum knapsack partition is (5,4,3,2).
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};
    sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    rsuks[n_]:=Select[IntegerPartitions[n],Function[q,UnsameQ@@Apply[Times,Apply[Plus,mps[q],{2}],{1}]]];
    Table[Length[rsuks[n]],{n,10}]

A320057 Heinz numbers of spanning sum-product knapsack partitions.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 25, 26, 29, 31, 33, 34, 35, 37, 38, 39, 41, 43, 46, 47, 49, 50, 51, 53, 55, 57, 58, 59, 61, 62, 65, 67, 69, 71, 73, 74, 75, 77, 79, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 98, 101, 103, 105
Offset: 1

Views

Author

Gus Wiseman, Oct 04 2018

Keywords

Comments

A spanning sum-product knapsack partition is a finite multiset m of positive integers such that every sum of products of parts of any multiset partition of m is distinct.
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
Differs from A320058 in having 1155, 1625, 1815, 1875, 1911, ... and lacking 20, 28, 42, 44, 52, ...

Examples

			The sequence of all spanning sum-product knapsack partitions begins: (), (1), (2), (1,1), (3), (2,1), (4), (1,1,1), (3,1), (5), (6), (4,1), (3,2), (7), (8), (4,2), (5,1), (9), (3,3), (6,1).
A complete list of sums of products of multiset partitions of the partition (5,4,3,2) is:
        (2*3*4*5) = 120
      (2)+(3*4*5) = 62
      (3)+(2*4*5) = 43
      (4)+(2*3*5) = 34
      (5)+(2*3*4) = 29
      (2*3)+(4*5) = 26
      (2*4)+(3*5) = 23
      (2*5)+(3*4) = 22
    (2)+(3)+(4*5) = 25
    (2)+(4)+(3*5) = 21
    (2)+(5)+(3*4) = 19
    (3)+(4)+(2*5) = 17
    (3)+(5)+(2*4) = 16
    (4)+(5)+(2*3) = 15
  (2)+(3)+(4)+(5) = 14
These are all distinct, and the Heinz number of (5,4,3,2) is 1155, so 1155 belongs to the sequence.
		

Crossrefs

Programs

  • Mathematica
    multWt[n_]:=If[n==1,1,Times@@Cases[FactorInteger[n],{p_,k_}:>PrimePi[p]^k]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Select[Range[100],UnsameQ@@Table[Plus@@multWt/@f,{f,facs[#]}]&]

A320058 Heinz numbers of spanning product-sum knapsack partitions.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 04 2018

Keywords

Comments

A spanning product-sum knapsack partition is a finite multiset m of positive integers such that every product of sums of parts of any multiset partition of m is distinct.
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
Differs from A320057 in having 20, 28, 42, 44, 52, ... and lacking 1155, 1625, 1815, 1875, 1911, ....

Examples

			The sequence of all spanning product-sum knapsack partitions begins: (), (1), (2), (1,1), (3), (2,1), (4), (1,1,1), (3,1), (5), (6), (4,1), (3,2), (7), (8), (3,1,1), (4,2), (5,1), (9), (3,3), (6,1), (4,1,1).
A complete list of products of sums of multiset partitions of the partition (3,1,1) is:
      (1+1+3) = 5
    (1)*(1+3) = 4
    (3)*(1+1) = 6
  (1)*(1)*(3) = 3
These are all distinct, and the Heinz number of (3,1,1) is 20, so 20 belongs to the sequence.
		

Crossrefs

Programs

  • Mathematica
    heinzWt[n_]:=If[n==1,0,Total[Cases[FactorInteger[n],{p_,k_}:>k*PrimePi[p]]]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Select[Range[100],UnsameQ@@Table[Times@@heinzWt/@f,{f,facs[#]}]&]

A319912 Number of distinct pairs (m, y), where m >= 1 and y is an integer partition of n, such that m can be obtained by iteratively adding any two or multiplying any two non-1 parts of y until only one part (equal to m) remains.

Original entry on oeis.org

1, 2, 3, 5, 12, 30, 53, 128, 247, 493, 989, 1889, 3434, 6390, 11526, 20400, 35818, 62083, 106223, 180170
Offset: 1

Views

Author

Gus Wiseman, Oct 01 2018

Keywords

Examples

			The a(6) = 30 pairs:
  1 <= (1)
  2 <= (2)
  2 <= (1,1)
  3 <= (3)
  3 <= (2,1)
  3 <= (1,1,1)
  4 <= (4)
  4 <= (2,2)
  4 <= (3,1)
  4 <= (2,1,1)
  4 <= (1,1,1,1)
  5 <= (5)
  5 <= (3,2)
  5 <= (4,1)
  5 <= (2,2,1)
  5 <= (3,1,1)
  5 <= (2,1,1,1)
  5 <= (1,1,1,1,1)
  6 <= (6)
  6 <= (3,2)
  6 <= (3,3)
  6 <= (4,2)
  6 <= (5,1)
  6 <= (2,2,1)
  6 <= (2,2,2)
  6 <= (3,1,1)
  6 <= (3,2,1)
  6 <= (4,1,1)
  6 <= (2,1,1,1)
  6 <= (2,2,1,1)
  6 <= (3,1,1,1)
  6 <= (1,1,1,1,1)
  6 <= (2,1,1,1,1)
  6 <= (1,1,1,1,1,1)
		

Crossrefs

Programs

  • Mathematica
    ReplaceListRepeated[forms_,rerules_]:=Union[Flatten[FixedPointList[Function[pre,Union[Flatten[ReplaceList[#,rerules]&/@pre,1]]],forms],1]];
    mexos[ptn_]:=If[Length[ptn]==0,{0},Union@@Select[ReplaceListRepeated[{Sort[ptn]},{{foe___,x_,mie___,y_,afe___}:>Sort[Append[{foe,mie,afe},x+y]],{foe___,x_?(#>1&),mie___,y_?(#>1&),afe___}:>Sort[Append[{foe,mie,afe},x*y]]}],Length[#]==1&]];
    Table[Total[Length/@mexos/@IntegerPartitions[n]],{n,20}]

A370816 Greatest number of multisets that can be obtained by choosing a divisor of each factor in an integer factorization of n into unordered factors > 1.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 3, 4, 2, 7, 2, 4, 4, 7, 2, 7, 2, 7, 4, 4, 2, 11, 3, 4, 5, 7, 2, 8, 2, 10, 4, 4, 4, 12, 2, 4, 4, 11, 2, 8, 2, 7, 7, 4, 2, 17, 3, 7, 4, 7, 2, 11, 4, 11, 4, 4, 2, 15, 2, 4, 7, 14, 4, 8, 2, 7, 4, 8, 2, 20, 2, 4, 7, 7, 4, 8, 2, 17, 7, 4, 2
Offset: 1

Views

Author

Gus Wiseman, Mar 06 2024

Keywords

Examples

			For the factorizations of 12 we have the following choices:
  (2*2*3): {{1,1,1},{1,1,2},{1,1,3},{1,2,2},{1,2,3},{2,2,3}}
    (2*6): {{1,1},{1,2},{1,3},{1,6},{2,2},{2,3},{2,6}}
    (3*4): {{1,1},{1,2},{1,3},{1,4},{2,3},{3,4}}
     (12): {{1},{2},{3},{4},{6},{12}}
So a(12) = 7.
		

Crossrefs

The version for partitions is A370808, for just prime factors A370809.
For just prime factors we have A370817.
A000005 counts divisors.
A001055 counts factorizations, strict A045778.
A355731 counts choices of a divisor of each prime index, firsts A355732.
A368413 counts non-choosable factorizations, complement A368414.
A370813 counts non-divisor-choosable factorizations, complement A370814.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Max[Length[Union[Sort/@Tuples[Divisors/@#]]]&/@facs[n]],{n,100}]
Previous Showing 21-30 of 47 results. Next