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-17 of 17 results.

A316365 Number of factorizations of n into factors > 1 such that every distinct subset of the factors has a different sum.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 2, 4, 1, 4, 1, 4, 2, 2, 1, 7, 2, 2, 3, 4, 1, 4, 1, 6, 2, 2, 2, 9, 1, 2, 2, 7, 1, 5, 1, 4, 4, 2, 1, 9, 2, 4, 2, 4, 1, 6, 2, 7, 2, 2, 1, 10, 1, 2, 4, 9, 2, 5, 1, 4, 2, 4, 1, 14, 1, 2, 4, 4, 2, 5, 1, 11, 5, 2, 1, 9, 2, 2, 2, 7, 1, 10, 2, 4, 2, 2, 2, 15, 1, 4, 4, 9, 1, 5, 1, 7, 5
Offset: 1

Views

Author

Gus Wiseman, Jun 30 2018

Keywords

Comments

Also the number of factorizations of n into factors > 1 which form a knapsack partition.

Examples

			The a(24) = 7 factorizations are (2*2*2*3), (2*2*6), (2*3*4), (2*12), (3*8), (4*6), (24).
The a(54) = 6 factorizations are (2*3*3*3), (2*3*9), (2*27), (3*18), (6*9), (54).
		

Crossrefs

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],UnsameQ@@Total/@Union[Subsets[#]]&]],{n,100}]
  • PARI
    primeprodbybits(v,b) = { my(m=1,i=1); while(b>0,if(b%2, m *= prime(v[i])); i++; b >>= 1); (m); };
    sumbybits(v,b) = { my(s=0,i=1); while(b>0,s += (b%2)*v[i]; i++; b >>= 1); (s); };
    all_distinct_subsets_have_different_sums(v) = { my(m=Map(),s,pp); for(i=0,(2^#v)-1, pp = primeprodbybits(v,i); s = sumbybits(v,i); if(mapisdefined(m,s), if(mapget(m,s)!=pp, return(0)), mapput(m,s,pp))); (1); };
    A316365(n, m=n, facs=List([])) = if(1==n, all_distinct_subsets_have_different_sums(Vec(facs)), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A316365(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Oct 08 2018

Extensions

More terms from Antti Karttunen, Oct 08 2018

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

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 01 2018

Keywords

Comments

Although the average of an empty set is technically indeterminate, we consider it to be distinct from the other subset-averages.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The a(60) = 9 distinct subset-averages of (3,2,1,1) are 0/0, 1, 4/3, 3/2, 5/3, 7/4, 2, 5/2, 3.
		

Crossrefs

Programs

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

Formula

a(n) = A316314(n) + 1.

Extensions

More terms from Antti Karttunen, Sep 23 2018

A319335 Numerator of the average of the averages of all integer partitions of n.

Original entry on oeis.org

1, 3, 11, 31, 187, 131, 247, 1993, 4463, 3635, 395077, 24441, 81149, 10414421, 12868591, 10764151, 61170133, 419426561, 353495183, 3429826973, 29219934899, 5110021867, 142319532929, 606916707064, 87086496509, 4426308633083, 15954910019953, 38414031851849
Offset: 1

Views

Author

Gus Wiseman, Sep 17 2018

Keywords

Examples

			The sequence of average averages begins: 1, 3/2, 11/6, 31/15, 187/84, 131/55, 247/100, 1993/770, 4463/1680, 3635/1323.
		

Crossrefs

Denominators are in A319336.

Programs

  • Mathematica
    Table[Numerator[Mean[Mean/@IntegerPartitions[n]]],{n,20}]
  • PARI
    seq(n)={[numerator(poldegree(p)*subst(intformal(p/y)/p, y, 1)) | p <- Vec(-1+1/prod(k=1, n, 1 - x^k*y + O(x*x^n)))]} \\ Andrew Howroyd, Sep 19 2018

A319336 Denominator of the average of the averages of all integer partitions of n.

Original entry on oeis.org

1, 2, 6, 15, 84, 55, 100, 770, 1680, 1323, 141120, 8470, 27720, 3474900, 4228224, 3468465, 19459440, 131030900, 109156320, 1042578108, 8779605120, 1514663280, 41736380400, 175685635125, 24960905112, 1254125149200, 4476730258000, 10664476594200, 73326164511600
Offset: 1

Views

Author

Gus Wiseman, Sep 17 2018

Keywords

Examples

			The sequence of average averages begins: 1, 3/2, 11/6, 31/15, 187/84, 131/55, 247/100, 1993/770, 4463/1680, 3635/1323.
		

Crossrefs

Programs

  • Mathematica
    Table[Denominator[Mean[Mean/@IntegerPartitions[n]]],{n,20}]
  • PARI
    seq(n)={[denominator(poldegree(p)*subst(intformal(p/y)/p, y, 1)) | p <- Vec(-1+1/prod(k=1, n, 1 - x^k*y + O(x*x^n)))]} \\ Andrew Howroyd, Sep 19 2018

A316362 Heinz numbers of strict integer partitions such that not every distinct subset has a different average.

Original entry on oeis.org

30, 105, 110, 210, 238, 273, 330, 385, 390, 462, 506, 510, 546, 570, 627, 690, 714, 770, 806, 858, 870, 910, 930, 935, 966, 1001, 1110, 1131, 1155, 1190, 1230, 1254, 1290, 1326, 1330, 1365, 1394, 1410, 1430, 1482, 1495, 1518, 1590, 1729, 1770, 1785, 1786, 1794
Offset: 1

Views

Author

Gus Wiseman, Jun 30 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			462 is the Heinz number of (5,4,2,1), and the subsets {1,5}, and {2,4} have the same average, so 462 belongs to the sequence.
		

Crossrefs

Programs

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

A316401 Number of strict integer partitions of n that are not knapsack (not every subset has a different sum) but every subset has a different average.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 3, 1, 3, 2, 4, 2, 6, 6, 11, 9, 9, 10, 20, 16, 18, 17, 27, 24, 31, 29, 43, 31, 43, 40, 59, 52, 58, 61, 83, 68, 93, 80, 124, 99, 120, 109, 145, 151, 185, 160, 232, 163, 257, 229, 314, 280, 286, 310, 427, 385, 513, 333, 596
Offset: 1

Views

Author

Gus Wiseman, Jul 01 2018

Keywords

Examples

			The a(22) = 11 partitions:
(11,6,5), (11,7,4), (11,8,3), (11,9,2), (11,10,1),
(11,5,4,2), (11,6,3,2), (11,8,2,1), (12,5,3,2), (12,5,4,1), (14,4,3,1).
		

Crossrefs

Programs

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

A316465 Heinz numbers of integer partitions such that every nonempty submultiset has an integer average.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 16, 17, 19, 21, 22, 23, 25, 27, 29, 31, 32, 34, 37, 39, 41, 43, 46, 47, 49, 53, 55, 57, 59, 61, 62, 64, 67, 68, 71, 73, 79, 81, 82, 83, 85, 87, 89, 91, 94, 97, 101, 103, 107, 109, 110, 111, 113, 115, 118, 121, 125, 127, 128
Offset: 1

Views

Author

Gus Wiseman, Jul 06 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Supersequence of A000961. - David A. Corneth, Jul 06 2018

Examples

			Sequence of partitions begins (), (1), (2), (1,1), (3), (4), (1,1,1), (2,2), (3,1), (5), (6), (1,1,1,1), (7), (8), (4,2), (5,1), (9), (3,3), (2,2,2).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],And@@IntegerQ/@Mean/@Union[Rest[Subsets[If[#==1,{},Flatten[Cases[FactorInteger[#],{p_,k_}:>Table[PrimePi[p],{k}]]]]]]]&]
Previous Showing 11-17 of 17 results.