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-10 of 27 results. Next

A316313 Number of integer partitions of n such that every distinct submultiset has a different average.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 6, 6, 9, 11, 10, 15, 17, 18, 22, 28, 26, 34, 37, 44, 50, 61, 53, 77, 82, 93, 89, 120, 120, 149, 138, 174, 180, 222, 193, 257, 262, 305, 281, 367, 359, 424, 398, 487, 507, 590, 526, 662, 666, 782, 729, 894, 892, 995, 987, 1154, 1188, 1370
Offset: 1

Views

Author

Gus Wiseman, Jun 29 2018

Keywords

Comments

Note that such a partition is necessarily strict.

Examples

			The a(8) = 6 integer partitions are (8), (71), (62), (53), (521), (431).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Mean/@Union[Subsets[#]]&]],{n,20}]

A333224 Number of distinct positive consecutive subsequence-sums of the k-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Mar 18 2020

Keywords

Comments

The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again.

Examples

			The composition (4,3,1,2) has positive subsequence-sums 1, 2, 3, 4, 6, 7, 8, 10, so a(550) = 8.
		

Crossrefs

Dominated by A124770.
Compositions where every subinterval has a different sum are counted by A169942 and A325677 and ranked by A333222. The case of partitions is counted by A325768 and ranked by A325779.
Positive subset-sums of partitions are counted by A276024 and A299701.
Knapsack partitions are counted by A108917 and A325592 and ranked by A299702.
Strict knapsack partitions are counted by A275972 and ranked by A059519 and A301899.
Knapsack compositions are counted by A325676 and A325687 and ranked by A333223. The case of partitions is counted by A325769 and ranked by A325778, for which the number of distinct consecutive subsequences is given by A325770.
Allowing empty subsequences gives A333257.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Union[ReplaceList[stc[n],{_,s__,_}:>Plus[s]]]],{n,0,100}]

Formula

a(n) = A333257(n) - 1.

A316314 Number of distinct nonempty-subset-averages of the integer partition with Heinz number n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 29 2018

Keywords

Comments

A rational number q is a nonempty-subset-average of an integer partition y if there exists a nonempty submultiset of y with average q.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The a(42) = 7 subset-averages of (4,2,1) are 1, 3/2, 2, 7/3, 5/2, 3, 4.
The a(72) = 7 subset-averages of (2,2,1,1,1) are 1, 5/4, 4/3, 7/5, 3/2, 5/3, 2.
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Union[Mean/@Rest[Subsets[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));
    A316314(n) = { my(m=Map(),s,k=0); fordiv(n,d,if((d>1)&&!mapisdefined(m,s = v056239[d]/bigomega(d)), mapput(m,s,s); k++)); (k); }; \\ Antti Karttunen, Sep 23 2018

Formula

a(n) = A316398(n) - 1.

Extensions

More terms from Antti Karttunen, Sep 23 2018

A316402 Number of strict non-knapsack integer partitions of n, meaning not every subset has a different sum.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1, 4, 3, 8, 6, 12, 10, 20, 16, 29, 25, 44, 39, 61, 60, 91, 84, 125, 126, 180, 179, 242, 247, 336, 347, 444, 472, 606, 628, 796, 844, 1053, 1109, 1363, 1452, 1779, 1885, 2272, 2431, 2931, 3104, 3706, 3972, 4711, 5042, 5909, 6334
Offset: 1

Views

Author

Gus Wiseman, Jul 01 2018

Keywords

Examples

			The a(12) = 4 partitions are (6,4,2), (6,5,1), (5,4,2,1), (6,3,2,1).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&!UnsameQ@@Total/@Union[Subsets[#]]&]],{n,30}]

Formula

a(n) = A000009(n) - A275972(n).

A301900 Heinz numbers of strict non-knapsack partitions. Squarefree numbers such that more than one divisor has the same Heinz weight A056239(d).

Original entry on oeis.org

30, 70, 154, 165, 210, 273, 286, 330, 390, 442, 462, 510, 546, 561, 570, 595, 646, 690, 714, 741, 770, 858, 870, 874, 910, 930, 1045, 1110, 1122, 1155, 1173, 1190, 1230, 1254, 1290, 1326, 1330, 1334, 1365, 1410, 1430, 1482, 1495, 1590, 1610, 1653, 1770
Offset: 1

Views

Author

Gus Wiseman, Mar 28 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).

Examples

			Sequence of strict non-knapsack partitions begins: (321), (431), (541), (532), (4321), (642), (651), (5321), (6321), (761), (5421), (7321), (6421), (752), (8321), (743), (871), (9321), (7421), (862), (5431), (6521).
		

Crossrefs

Programs

  • Mathematica
    wt[n_]:=If[n===1,0,Total[Cases[FactorInteger[n],{p_,k_}:>k*PrimePi[p]]]];
    Select[Range[1000],SquareFreeQ[#]&&!UnsameQ@@wt/@Divisors[#]&]

Formula

Complement of A005117 in A299702.

A325778 Heinz numbers of integer partitions whose distinct consecutive subsequences have different sums.

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

Views

Author

Gus Wiseman, May 20 2019

Keywords

Comments

First differs from A299702 in having 462.
The enumeration of these partitions by sum is given by A325769.

Examples

			Most small numbers are in the sequence. However, the sequence of non-terms together with their prime indices begins:
  12: {1,1,2}
  24: {1,1,1,2}
  30: {1,2,3}
  36: {1,1,2,2}
  40: {1,1,1,3}
  48: {1,1,1,1,2}
  60: {1,1,2,3}
  63: {2,2,4}
  70: {1,3,4}
  72: {1,1,1,2,2}
  80: {1,1,1,1,3}
  84: {1,1,2,4}
  90: {1,2,2,3}
  96: {1,1,1,1,1,2}
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],UnsameQ@@Total/@Union[ReplaceList[primeMS[#],{_,s__,_}:>{s}]]&]

A325398 Heinz numbers of reversed integer partitions whose k-th differences are strictly increasing for all k >= 0.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 02 2019

Keywords

Comments

First differs from A301899 in lacking 105. First differs from A325399 in having 42.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (6,3,1) are (-3,-2).
The zeroth differences of a sequence are the sequence itself, while the k-th differences for k > 0 are the differences of the (k-1)-th differences.
The enumeration of these partitions by sum is given by A325391.

Examples

			The sequence of terms together with their prime indices begins:
    1: {}
    2: {1}
    3: {2}
    5: {3}
    6: {1,2}
    7: {4}
   10: {1,3}
   11: {5}
   13: {6}
   14: {1,4}
   15: {2,3}
   17: {7}
   19: {8}
   21: {2,4}
   22: {1,5}
   23: {9}
   26: {1,6}
   29: {10}
   31: {11}
   33: {2,5}
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],And@@Table[Less@@Differences[primeMS[#],k],{k,0,PrimeOmega[#]}]&]

A319315 Heinz numbers of integer partitions such that every distinct submultiset has a different average.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 17 2018

Keywords

Comments

Note that such a Heinz number is necessarily squarefree, as such a partition is necessarily strict.
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
First differs from A301899 at a(43) = 70, because (4,3,1) is not knapsack but every submultiset has a different average.

Examples

			The sequence of partitions whose Heinz numbers belong to the sequence begins: (), (1), (2), (3), (2,1), (4), (3,1), (5), (6), (4,1), (3,2), (7), (8), (4,2), (5,1), (9), (6,1), (10), (11), (5,2), (7,1), (4,3), (12), (8,1), (6,2), (13), (4,2,1).
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],UnsameQ@@Mean/@Union[Subsets[primeMS[#]]]&]

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[#]}]&]
Showing 1-10 of 27 results. Next