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 31-40 of 45 results. Next

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

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 4, 1, 2, 4, 6, 4, 13, 6, 13, 17, 15, 12, 31, 26, 27, 23, 36, 41, 56, 39, 47, 74, 71, 55, 101, 94, 110, 97, 145, 148, 189, 142, 214, 232, 280, 206, 362, 332, 414, 347, 504, 469, 658, 492, 726, 697, 867, 687, 1100, 933
Offset: 1

Views

Author

Gus Wiseman, Jul 01 2018

Keywords

Examples

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

Crossrefs

Programs

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

A319327 Heinz numbers of integer partitions such that every distinct submultiset has a different LCM.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 15, 17, 19, 23, 29, 31, 33, 35, 37, 41, 43, 47, 51, 53, 55, 59, 61, 67, 69, 71, 73, 77, 79, 83, 85, 89, 91, 93, 95, 97, 101, 103, 107, 109, 113, 119, 123, 127, 131, 137, 139, 141, 143, 145, 149, 151, 155, 157, 161, 163, 165, 167, 173
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 A304713 (Heinz numbers of pairwise indivisible partitions) at A304713(642) = 2093, which is absent from this sequence because its prime indices are {4,6,9} and LCM(4,9) = LCM(4,6,9) = 36.

Examples

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

Crossrefs

Programs

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

A316364 Number of factorizations of n into factors > 1 such that every distinct submultiset of the factors has a different average.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 30 2018

Keywords

Comments

Note that such a factorization is necessarily strict.

Examples

			The a(80) = 6 factorizations are (80), (10*8), (16*5), (20*4), (40*2), (10*4*2).
		

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@@Mean/@Union[Subsets[#]]&]],{n,50}]
  • PARI
    choosebybits(v,m) = { my(s=vector(hammingweight(m)),i=j=1); while(m>0,if(m%2,s[j] = v[i];j++); i++; m >>= 1); s; };
    hasdupavgs(v) = { my(avgs=Map(), k); for(i=1,(2^(#v))-1,k = (vecsum(choosebybits(v,i))/hammingweight(i)); if(mapisdefined(avgs,k),return(i),mapput(avgs,k,i))); (0); };
    A316364(n, m=n, facs=List([])) = if(1==n, (0==hasdupavgs(Vec(facs))), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A316364(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Sep 21 2018

Extensions

More terms from Antti Karttunen, Sep 21 2018

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

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

Original entry on oeis.org

24, 56, 60, 110, 120, 135, 140, 168, 210, 216, 224, 264, 270, 273, 280, 308, 312, 315, 330, 342, 360, 378, 384, 408, 420, 440, 456, 459, 480, 504, 520, 540, 546, 550, 552, 576, 585, 594, 600, 616, 630, 660, 672, 693, 696, 702, 728, 744, 756, 759, 760, 770, 780
Offset: 1

Views

Author

Gus Wiseman, Jun 30 2018

Keywords

Comments

Let f(n) = A050376(n) be the n-th Fermi-Dirac prime. The FDH number of a strict integer partition (y_1,...,y_k) is f(y_1)*...*f(y_k).

Examples

			210 is the FDH number of (5,4,2,1), and the subsets {1,5}, and {2,4} have the same average, so 210 belongs to the data.
		

Crossrefs

Programs

  • Mathematica
    nn=1000;
    FDfactor[n_]:=If[n==1,{},Sort[Join@@Cases[FactorInteger[n],{p_,k_}:>Power[p,Cases[Position[IntegerDigits[k,2]//Reverse,1],{m_}->2^(m-1)]]]]];
    FDprimeList=Array[FDfactor,nn,1,Union];FDrules=MapIndexed[(#1->#2[[1]])&,FDprimeList];
    Select[Range[nn],!UnsameQ@@Mean/@Union[Subsets[FDfactor[#]/.FDrules]]&]

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}]
Previous Showing 31-40 of 45 results. Next