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 13 results. Next

A301899 Heinz numbers of strict knapsack partitions. Squarefree numbers such that every divisor has a different Heinz weight A056239(d).

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, 105, 106, 107, 109
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

			42 is the Heinz number of (4,2,1) which is strict and knapsack, so is in the sequence. 45 is the Heinz number of (3,2,2) which is knapsack but not strict, so is not in the sequence. 30 is the Heinz number of (3,2,1) which is strict but not knapsack, so is not in the sequence.
Sequence of strict knapsack partitions begins: (), (1), (2), (3), (21), (4), (31), (5), (6), (41), (32), (7), (8), (42), (51), (9), (61).
		

Crossrefs

Programs

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

Formula

Intersection of A299702 and A005117.

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

A301855 Number of divisors d|n such that no other divisor of n has the same Heinz weight A056239(d).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Mar 27 2018

Keywords

Examples

			The a(24) = 4 special divisors are 1, 2, 12, 24.
		

Crossrefs

Programs

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

Extensions

More terms from Antti Karttunen, Jul 01 2018

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.

A301935 Number of positive subset-sum trees whose composite a positive subset-sum of the integer partition with Heinz number n.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 10, 2, 3, 1, 21, 1, 3, 3, 58, 1, 21, 1, 21, 3, 3, 1, 164, 2, 3, 10, 21, 1, 34, 1, 373, 3, 3, 3, 218, 1, 3, 3, 161, 1, 7, 1, 5, 5, 3, 1, 1320, 2, 5, 3, 5, 1, 7, 3, 7, 3, 3, 1, 7, 1, 3, 4, 2558, 3, 7, 1, 5, 3, 6, 1, 7
Offset: 1

Views

Author

Gus Wiseman, Mar 28 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). A positive subset-sum tree with root x is either the symbol x itself, or is obtained by first choosing a positive subset-sum x <= (y_1,...,y_k) with k > 1 and then choosing a positive subset-sum tree with root y_i for each i = 1...k. The composite of a positive subset-sum tree is the positive subset-sum x <= g where x is the root sum and g is the multiset of leaves. We write positive subset-sum trees in the form rootsum(branch,...,branch). For example, 4(1(1,3),2,2(1,1)) is a positive subset-sum tree with composite 4(1,1,1,2,3) and weight 8.

Crossrefs

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).

A301934 Number of positive subset-sum trees of weight n.

Original entry on oeis.org

1, 3, 14, 85, 586, 4331, 33545, 268521, 2204249
Offset: 1

Views

Author

Gus Wiseman, Mar 28 2018

Keywords

Comments

A positive subset-sum tree with root x is either the symbol x itself, or is obtained by first choosing a positive subset-sum x <= (y_1,...,y_k) with k > 1 and then choosing a positive subset-sum tree with root y_i for each i = 1...k. The weight is the sum of the leaves. We write positive subset-sum trees in the form rootsum(branch,...,branch). For example, 4(1(1,3),2,2(1,1)) is a positive subset-sum tree with composite 4(1,1,1,2,3) and weight 8.

Examples

			The a(3) = 14 positive subset-sum trees:
3           3(1,2)       3(1,1,1)     3(1,2(1,1))
2(1,2)      2(1,1,1)     2(1,1(1,1))  2(1(1,1),1)  2(1,2(1,1))
1(1,2)      1(1,1,1)     1(1,1(1,1))  1(1(1,1),1)  1(1,2(1,1))
		

Crossrefs

A304796 Number of special sums of integer partitions of n.

Original entry on oeis.org

1, 2, 5, 10, 18, 32, 51, 82, 122, 188, 262, 392, 529, 750, 997, 1404, 1784, 2452, 3123, 4164, 5239, 6916, 8499, 11112, 13693, 17482, 21257, 27162, 32581, 41114, 49606, 61418, 73474, 91086, 107780, 132874, 157359, 191026, 225159, 274110, 320691, 386722, 453875
Offset: 0

Views

Author

Gus Wiseman, May 18 2018

Keywords

Comments

A special sum of an integer partition y is a number n >= 0 such that exactly one submultiset of y sums to n.

Examples

			The a(4) = 18 special positive subset-sums:
0<=(4), 4<=(4),
0<=(22), 2<=(22), 4<=(22),
0<=(31), 1<=(31), 3<=(31), 4<=(31),
0<=(211), 1<=(211), 3<=(211), 4<=(211),
0<=(1111), 1<=(1111), 2<=(1111), 3<=(1111), 4<=(1111).
		

Crossrefs

Programs

  • Mathematica
    uqsubs[y_]:=Join@@Select[GatherBy[Union[Subsets[y]],Total],Length[#]===1&];
    Table[Total[Length/@uqsubs/@IntegerPartitions[n]],{n,25}]

Formula

a(n) = A301854(n) + A000041(n).

Extensions

More terms from Alois P. Heinz, May 18 2018
a(36)-a(42) from Chai Wah Wu, Sep 26 2023

A321144 Irregular triangle where T(n,k) is the number of divisors of n whose prime indices sum to k.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0
Offset: 1

Views

Author

Gus Wiseman, Oct 28 2018

Keywords

Comments

The rows are all palindromes.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			Triangle begins:
  1
  1  1
  1  0  1
  1  1  1
  1  0  0  1
  1  1  1  1
  1  0  0  0  1
  1  1  1  1
  1  0  1  0  1
  1  1  0  1  1
  1  0  0  0  0  1
  1  1  2  1  1
  1  0  0  0  0  0  1
  1  1  0  0  1  1
  1  0  1  1  0  1
  1  1  1  1  1
  1  0  0  0  0  0  0  1
  1  1  1  1  1  1
  1  0  0  0  0  0  0  0  1
  1  1  1  1  1  1
  1  0  1  0  1  0  1
  1  1  0  0  0  1  1
  1  0  0  0  0  0  0  0  0  1
  1  1  2  2  1  1
  1  0  0  1  0  0  1
  1  1  0  0  0  0  1  1
  1  0  1  0  1  0  1
  1  1  1  0  1  1  1
  1  0  0  0  0  0  0  0  0  0  1
  1  1  1  2  1  1  1
		

Crossrefs

Row lengths are A056239. Number of nonzero entries in row n is A299701(n).

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]
    Table[Count[Total/@primeMS/@Divisors[n],k],{n,20},{k,0,Total[primeMS[n]]}]

A301970 Heinz numbers of integer partitions with more subset-products than subset-sums.

Original entry on oeis.org

165, 273, 325, 351, 495, 525, 561, 595, 675, 741, 765, 819, 825, 931, 1045, 1053, 1155, 1173, 1425, 1485, 1495, 1575, 1625, 1653, 1683, 1771, 1785, 1815, 1911, 2025, 2139, 2145, 2223, 2275, 2277, 2295, 2310, 2415, 2457, 2465, 2475, 2625, 2639, 2695, 2805, 2945
Offset: 1

Views

Author

Gus Wiseman, Mar 29 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.
Numbers n such that A301957(n) > A299701(n).

Examples

			Sequence of partitions begins: (532), (642), (633), (6222), (5322), (4332), (752), (743), (33222), (862), (7322), (6422), (5332), (844), (853), (62222), (5432), (972), (8332), (53222), (963), (43322), (6333).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],With[{ptn=If[#===1,{},Join@@Cases[FactorInteger[#],{p_,k_}:>Table[PrimePi[p],{k}]]]},Length[Union[Times@@@Subsets[ptn]]]>Length[Union[Plus@@@Subsets[ptn]]]]&]
Showing 1-10 of 13 results. Next