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

A299701 Number of distinct subset-sums of the integer partition with Heinz number n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Feb 17 2018

Keywords

Comments

An integer n is a subset-sum of an integer partition y if there exists a submultiset of y with sum n. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Position of first appearance of n appears to be A259941(n-1) = least Heinz number of a complete partition of n-1. - Gus Wiseman, Nov 16 2023

Examples

			The subset-sums of (5,1,1,1) are {0, 1, 2, 3, 5, 6, 7, 8} so a(88) = 8.
The subset-sums of (4,3,1) are {0, 1, 3, 4, 5, 7, 8} so a(70) = 7.
		

Crossrefs

Positions of first appearances are A259941.
The triangle for this rank statistic is A365658.
The semi version is A366739, sum A366738, strict A366741.

Programs

  • Mathematica
    Table[Length[Union[Total/@Subsets[Join@@Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]],{n,100}]

Formula

a(n) <= A000005(n) and a(n) = A000005(n) iff n is the Heinz number of a knapsack partition (A299702).

Extensions

Comment corrected by Gus Wiseman, Aug 09 2024

A367097 Least positive integer whose multiset of prime indices has exactly n distinct semi-sums.

Original entry on oeis.org

1, 4, 12, 30, 60, 210, 330, 660, 2730, 3570, 6270, 12540, 53130, 79170, 110670, 221340, 514140, 1799490, 2284590, 4196010, 6750870, 13501740, 37532220, 97350330, 131362770, 189620970, 379241940, 735844830, 1471689660
Offset: 0

Views

Author

Gus Wiseman, Nov 09 2023

Keywords

Comments

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.
We define a semi-sum of a multiset to be any sum of a 2-element submultiset. This is different from sums of pairs of elements. For example, 2 is the sum of a pair of elements of {1}, but there are no semi-sums.
From David A. Corneth, Nov 15 2023: (Start)
Terms are cubefree.
bigomega(a(n)) = A001222(a(n)) >= A002024(n) + 1 = floor(sqrt(2n) + 1/2) + 1 for n > 0. (End)

Examples

			The prime indices of 60 are {1,1,2,3}, with four semi-sums {2,3,4,5}, and 60 is the first number whose prime indices have four semi-sums, so a(4) = 60.
The terms together with their prime indices begin:
       1: {}
       4: {1,1}
      12: {1,1,2}
      30: {1,2,3}
      60: {1,1,2,3}
     210: {1,2,3,4}
     330: {1,2,3,5}
     660: {1,1,2,3,5}
    2730: {1,2,3,4,6}
    3570: {1,2,3,4,7}
    6270: {1,2,3,5,8}
   12540: {1,1,2,3,5,8}
   53130: {1,2,3,4,5,9}
   79170: {1,2,3,4,6,10}
  110670: {1,2,3,4,7,11}
  221340: {1,1,2,3,4,7,11}
  514140: {1,1,2,3,5,8,13}
		

Crossrefs

The non-binary version is A259941, firsts of A299701.
These are the positions of first appearances in A366739.
A001222 counts prime factors (or prime indices), distinct A001221.
A001358 lists semiprimes, squarefree A006881, complement A100959.
A056239 adds up prime indices, row sums of A112798.
A299702 ranks knapsack partitions, counted by A108917.
A366738 counts semi-sums of partitions, strict A366741.
Semiprime divisors are listed by A367096 and have:
- square count: A056170
- sum: A076290
- squarefree count: A079275
- count: A086971
- firsts: A220264

Programs

  • Mathematica
    nn=1000;
    w=Table[Length[Union[Total/@Subsets[prix[n],{2}]]],{n,nn}];
    spnm[y_]:=Max@@NestWhile[Most,y,Union[#]!=Range[0,Max@@#]&];
    v=Table[Position[w,k][[1,1]],{k,0,spnm[w]}]
  • Python
    from itertools import count
    from sympy import factorint, primepi
    from sympy.utilities.iterables import multiset_combinations
    def A367097(n): return next(k for k in count(1) if len({sum(s) for s in multiset_combinations({primepi(i):j for i,j in factorint(k).items()},2)}) == n) # Chai Wah Wu, Nov 13 2023

Formula

2 | a(n) for n > 0. - David A. Corneth, Nov 13 2023

Extensions

a(17)-a(22) from Chai Wah Wu, Nov 13 2023
a(23)-a(28) from David A. Corneth, Nov 13 2023

A258118 Triangle T(n,k) in which the n-th row lists in increasing order the Heinz numbers of all complete partitions of n.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 20, 24, 32, 30, 36, 40, 48, 64, 42, 54, 56, 60, 72, 80, 96, 128, 84, 90, 100, 108, 112, 120, 144, 160, 192, 256, 126, 132, 140, 150, 162, 168, 176, 180, 200, 216, 224, 240, 288, 320, 384, 512, 198, 210, 220, 252, 264, 270, 280, 300, 324, 336, 352, 360, 400, 432, 448, 480, 576, 640, 768, 1024
Offset: 0

Views

Author

Emeric Deutsch, Jun 07 2015

Keywords

Comments

A partition of n is complete if every number from 1 to n can be represented as a sum of parts of the partition.
The Heinz number of a partition p = [p_1, p_2, ..., p_r] is defined as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1,1,1,4] we get 2*2*2*7 = 56. It is in the sequence because the partition [1,1,1,4] is complete.
Except for a(0)=1, there are no odd numbers in the sequence. Indeed, a partition having an odd Heinz number does not have 1 as a part and, consequently, it cannot be complete.
Number of terms in row n is A126796(n). As a matter of fact, so far, the triangle has been constructed by selecting those A126796(n) entries from row n of A215366 which correspond to complete partitions. Last term in row n is 2^n.

Examples

			54 = 2*3*3*3 is in the sequence because the partition [1,2,2,2] is complete.
28 = 2*2*7 is not in the sequence because the partition [1,1,4] is not complete.
Triangle T(n,k) begins:
   1;
   2;
   4;
   6,  8;
  12, 16;
  18, 20,  24,  32;
  30, 36,  40,  48,  64;
  42, 54,  56,  60,  72,  80,  96, 128;
  84, 90, 100, 108, 112, 120, 144, 160, 192, 256;
  ...
		

Crossrefs

Column k=1 gives A259941.
Row sums give A360791.

Programs

  • Maple
    T:= proc(m) local b, ll, p;
          p:= proc(l) ll:=ll, (mul(ithprime(j), j=l)); 1 end:
          b:= proc(n, i, l) `if`(i<2, p([l[], 1$n]), `if`(n<2*i-1,
          b(n, iquo(n+1, 2), l), b(n, i-1, l)+b(n-i, i, [l[], i])))
          end: ll:= NULL; b(m, iquo(m+1, 2), []): sort([ll])[]
        end:
    seq(T(n), n=0..12);  # Alois P. Heinz, Jun 07 2015
  • Mathematica
    T[m_] := Module[{b, ll, p}, p[l_List] := (ll = Append[ll, Product[Prime[j], {j, l}]]; 1); b[n_, i_, l_List] := If[i<2, p[Join[l, Array[1&, n]]], If[n < 2*i-1, b[n, Quotient[n+1, 2], l], b[n, i-1, l] + b[n-i, i, Append[l, i] ]]]; ll = {}; b[m, Quotient[m+1, 2], {}]; Sort[ll]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 28 2016, after Alois P. Heinz *)

A259939 Smallest Product_{i:lambda} prime(i) for any perfect partition lambda of n.

Original entry on oeis.org

1, 2, 4, 6, 16, 18, 64, 42, 100, 162, 1024, 234, 4096, 1088, 1936, 798, 65536, 2300, 262144, 4698, 18496, 31744, 4194304, 8658, 234256, 167936, 52900, 46784, 268435456, 90992, 1073741824, 42294, 984064, 3866624, 5345344, 140300, 68719476736, 17563648, 6885376
Offset: 0

Views

Author

Alois P. Heinz, Jul 09 2015

Keywords

Comments

A perfect partition of n contains a unique partition for any k in {0,...,n}. See also A002033.

Examples

			For n=7 there are 4 perfect partitions: [4,1,1,1], [4,2,1], [2,2,2,1] and [1,1,1,1,1,1,1], their encodings as Product_{i:lambda} prime(i) give 56, 42, 54, 128, respectively.  The smallest value is a(7) = 42.
		

Crossrefs

Column k=1 of A258119.

Programs

  • Maple
    b:= (n, l)-> `if`(n=1, 2^(l[1]-1)*mul(ithprime(mul(l[j],
          j=1..i-1))^(l[i]-1), i=2..nops(l)), min(seq(b(n/d,
            [l[], d]), d=numtheory[divisors](n) minus{1}))):
    a:= n-> `if`(n=0, 1, b(n+1, [])):
    seq(a(n), n=0..42);
  • Mathematica
    b[n_, l_] := If[n==1, 2^(l[[1]]-1)*Product[Prime[Product[l[[j]], {j, 1, i-1}]]^(l[[i]]-1), {i, 2, Length[l]}], Min[Table[b[n/d, Append[l, d]], {d, Divisors[n] ~Complement~ {1}}]]];
    a[n_] := If[n==0, 1, b[n+1, {}]];
    Table[a[n], {n, 0, 42}] (* Jean-François Alcover, Mar 23 2017, translated from Maple *)

Formula

a(n) = A258119(n,1).

A367106 Triangle read by rows where T(n,k) is the number of complete length-k integer partitions of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 09 2023

Keywords

Comments

An integer partition of n is complete (ranks A325781) if every integer from 0 to n is the sum of some submultiset of the parts.

Examples

			Triangle begins:
  1
  0  1
  0  0  1
  0  0  1  1
  0  0  0  1  1
  0  0  0  2  1  1
  0  0  0  1  2  1  1
  0  0  0  1  3  2  1  1
  0  0  0  0  3  3  2  1  1
  0  0  0  0  4  5  3  2  1  1
  0  0  0  0  3  5  5  3  2  1  1
  0  0  0  0  4  8  7  5  3  2  1  1
  0  0  0  0  2  9  9  7  5  3  2  1  1
  0  0  0  0  2 11 12 11  7  5  3  2  1  1
  0  0  0  0  1 11 16 13 11  7  5  3  2  1  1
  0  0  0  0  1 14 21 19 15 11  7  5  3  2  1  1
Row n = 11 counts the following partitions (empty columns not shown):
  6311  62111  611111  5111111  41111111  311111111  2111111111  11111111111
  6221  53111  521111  4211111  32111111  221111111
  5321  52211  431111  3311111  22211111
  4421  44111  422111  3221111
        43211  332111  2222111
        42221  322211
        33311  222221
        33221
		

Crossrefs

Column k appears to have A000325(k) nonzero terms.
Column sums are A003513.
Central column T(2n,n) is A007042.
Row sums are A126796, ranks A325781.
The strict case is too sparse, row sums A188431 (complement A365831).
Grouping by maximum instead of length gives A261036.
A000041 counts integer partitions.
A108917 counts knapsack partitions, ranks A299702.
A299701 counts subset-sums of prime indices, firsts A259941.
A365924 counts incomplete partitions, ranks A365830.

Programs

  • Mathematica
    nmz[y_]:=Complement[Range[Total[y]],Total/@Subsets[y]];
    Table[Length[Select[IntegerPartitions[n,{k}],nmz[#]=={}&]],{n,0,15},{k,0,n}]
Showing 1-5 of 5 results.