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

A002219 a(n) is the number of partitions of 2n that can be obtained by adding together two (not necessarily distinct) partitions of n.

Original entry on oeis.org

1, 3, 6, 14, 25, 53, 89, 167, 278, 480, 760, 1273, 1948, 3089, 4682, 7177, 10565, 15869, 22911, 33601, 47942, 68756, 96570, 136883, 189674, 264297, 362995, 499617, 678245, 924522, 1243098, 1676339, 2237625, 2988351, 3957525, 5247500, 6895946, 9070144, 11850304
Offset: 1

Views

Author

Keywords

Examples

			Here are the seven partitions of 5: 1^5, 1^3 2, 1 2^2, 1^2 3, 2 3, 1 4, 5. Adding these together in pairs we get a(5) = 25 partitions of 10: 1^10, 1^8 2, 1^6 2^2, etc. (we get all partitions of 10 into parts of size <= 5 - there are 30 such partitions - except for five of them: we do not get 2 4^2, 3^2 4, 2^3 4, 1 3^3, 2^5). - _N. J. A. Sloane_, Jun 03 2012
From _Gus Wiseman_, Oct 27 2022: (Start)
The a(1) = 1 through a(4) = 14 partitions:
  (11)  (22)    (33)      (44)
        (211)   (321)     (422)
        (1111)  (2211)    (431)
                (3111)    (2222)
                (21111)   (3221)
                (111111)  (3311)
                          (4211)
                          (22211)
                          (32111)
                          (41111)
                          (221111)
                          (311111)
                          (2111111)
                          (11111111)
(End)
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column m=2 of A213086.
Bisection of A276107.
The strict version is A237258, ranked by A357854.
Ranked by A357976 = positions of nonzero terms in A357879.
A122768 counts distinct submultisets of partitions.
A304792 counts subset-sums of partitions, positive A276024, strict A284640.

Programs

  • Maple
    g:= proc(n, i) option remember;
         `if`(n=0, 1, `if`(i>1, g(n, i-1), 0)+`if`(i>n, 0, g(n-i, i)))
        end:
    b:= proc(n, i, s) option remember;
         `if`(i=1 and s<>{} or n in s, g(n, i), `if`(i<1 or s={}, 0,
          b(n, i-1, s)+ `if`(i>n, 0, b(n-i, i, map(x-> {`if`(x>n-i, NULL,
          max(x, n-i-x)), `if`(xn, NULL, max(x-i, n-x))}[], s)))))
        end:
    a:= n-> b(2*n, n, {n}):
    seq(a(n), n=1..25);  # Alois P. Heinz, Jul 10 2012
  • Mathematica
    b[n_, i_, s_] := b[n, i, s] = If[MemberQ[s, 0 | n], 0, If[n == 0, 1, If[i < 1, 0, b[n, i-1, s] + If[i <= n, b[n-i, i, Select[Flatten[Transpose[{s, s-i}]], 0 <= # <= n-i &]], 0]]]]; A006827[n_] := b[2*n, 2*n, {n}]; a[n_] := PartitionsP[2*n] - A006827[n]; Table[Print[an = a[n]]; an, {n, 1, 25}] (* Jean-François Alcover, Nov 12 2013, after Alois P. Heinz *)
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    subptns[s_]:=primeMS/@Divisors[Times@@Prime/@s];
    Table[Length[Select[IntegerPartitions[2n],MemberQ[Total/@subptns[#],n]&]],{n,10}] (* Gus Wiseman, Oct 27 2022 *)
  • Python
    from itertools import combinations_with_replacement
    from sympy.utilities.iterables import partitions
    def A002219(n): return len({tuple(sorted((p+q).items())) for p, q in combinations_with_replacement(tuple(Counter(p) for p in partitions(n)),2)}) # Chai Wah Wu, Sep 20 2023

Formula

See A213074 for Metropolis and Stein's formulas.
a(n) = A000041(2*n) - A006827(n) = A000041(2*n) - A046663(2*n,n).
a(n) = A276107(2*n). - Max Alekseyev, Oct 17 2022

Extensions

Better description from Vladeta Jovovic, Mar 06 2000
More terms from Christian G. Bower, Oct 12 2001
Edited by N. J. A. Sloane, Jun 03 2012
More terms from Alois P. Heinz, Jul 10 2012

A371731 Heinz numbers of non-biquanimous integer partitions. Numbers without a divisor having the same sum of prime indices as the quotient.

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 10, 11, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80
Offset: 1

Author

Gus Wiseman, Apr 07 2024

Keywords

Comments

These partitions are counted by A371795, even case A006827.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
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.
A finite multiset of numbers is defined to be biquanimous iff it can be partitioned into two multisets with equal sums. Biquanimous partitions are counted by A002219 aerated and ranked by A357976.

Examples

			The prime indices of 975 are {2,3,3,6}, which are not biquanimous, so 975 is in the sequence.
The prime indices of 900 are {1,1,2,2,3,3}, which can be partitioned into {{1,2,3},{1,2,3}} or {{3,3},{1,1,2,2}}, so 900 is not in the sequence.
		

Crossrefs

The complement is A357976, counted by A002219.
For prime signature instead of indices we have A371782, complement A371781.
Partitions of this type are counted by A371795, even case A006827.
A108917 counts knapsack partitions, ranks A299702, strict A275972.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A237258 aerated counts biquanimous strict partitions, ranks A357854.
A321142 and A371794 count non-biquanimous strict partitions.
A321451 counts non-quanimous partitions, ranks A321453.
A321452 counts quanimous partitions, ranks A321454.
A366754 counts non-knapsack partitions, ranks A299729, strict A316402.
A371737 counts quanimous strict partitions, complement A371736.
A371783 counts k-quanimous partitions.
A371789 counts non-quanimous sets, differences A371790.
A371791 counts biquanimous sets, differences A232466.
A371792 counts non-biquanimous sets, differences A371793.
A371796 counts quanimous sets, differences A371797.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    biqQ[y_]:=MemberQ[Total/@Subsets[y],Total[y]/2];
    Select[Range[100],Not@*biqQ@*prix]

Formula

Numbers n without a divisor d|n such that A056239(d) = A056239(n/d).

A213074 Irregular triangle read by rows: coefficients c(n,k) (n>=2, 0<=k<= floor((n-2)/2)) in formula for number of restricted partitions.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 7, 8, 1, 10, 14, 1, 17, 50, 36, 1, 24, 89, 78, 1, 36, 207, 368, 200, 1, 49, 340, 701, 431, 1, 70, 685, 2190, 2756, 1188, 1, 93, 1075, 3935, 5564, 2658
Offset: 2

Author

N. J. A. Sloane, Jun 04 2012

Keywords

Comments

Let T^(n)_m denote the number of partitions of mn that can be obtained by adding together m (not necessarily distinct) partitions of n (see A213086). For T^(n)_2, T^(n)_3, T^(n)_4, T^(n)_5 see A002219 through A002222.
Metropolis and Stein show that T^(n)_m is given by the formula
T^(n)m = Sum{k=0..n-g-1} binomial(m+g,g+k) c(n,k), where g = floor((n+1)/2).

Examples

			Triangle c(n,k) begins:
n\k
-  0    1    2    3    4    5 ...
---------------------------------
2  1
3  1
4  1    2
5  1    3
6  1    7    8
7  1   10   14
8  1   17   50   36
9  1   24   89   78
10 1   36  207  368  200
11 1   49  340  701  431
12 1   70  685 2190 2756 1188
13 1   93 1075 3935 5564 2658
...
		

Programs

  • Maple
    with(combinat):
    h:= proc(n, m) option remember;
          `if`(m>1, map(x-> map(y-> sort([x[], y[]]), h(n, 1))[],
           h(n, m-1)), `if`(m=1, map(x->map(y-> `if`(y>1, y-1, NULL), x),
           {partition(n)[]}), {[]}))
        end:
    T:= proc(n) local i, g, t;
          g:= floor((n+1)/2);
          subs(solve({seq(nops(h(n, t))=add(c||i *binomial(t+g, g+i),
          i=0..n-g-1), t=1..n-g)}, {seq(c||i, i=0..n-g-1)}),
          [seq(c||i, i=0..n-g-1)])[]
        end:
    seq(T(n), n=2..10);  # Alois P. Heinz, Jul 11 2012
  • Mathematica
    nmax = 13; mmax = 5;
    T[n_, m_] := T[n, m] = Module[{ip, lg, i}, ip = IntegerPartitions[n]; lg = Length[ip]; i[0] = 1; Table[ Join[ Sequence @@ Table[ip[[i[k]]], {k, 1, m}]] // Sort, Evaluate[Sequence @@ Table[{i[k], i[k - 1], lg}, {k, 1, m}]]] // Flatten[#, m - 1] & // Union // Length]; T[_, 0] = 1;
    U[n_, m_] := With[{g = Floor[(n + 1)/2]}, If[n == 1, 1, Sum[Binomial[m + g, g + k] c[n, k], {k, 0, n - g - 1}]]];
    Do[TT = Table[T[n , m] - U[n , m], {n, 1, nmax}, {m, 0, mm}] // Flatten; c[_, 0] = 1; sol = Solve[Thread[TT == 0]][[1]]; cc = Table[c[n, k], {n, 2, nmax}, {k, 0, Floor[(n - 2)/2]}] /. sol // Flatten; Print[cc], {mm, 2, mmax}];
    cc (* Jean-François Alcover, May 25 2016 *)

Extensions

12 more terms (rows 12-13) from Alois P. Heinz, Jul 11 2012

A213086 Square array read by antidiagonals: T(n,m) (n>=1, m>=0) is the number of partitions of mn that are the sum of m not necessarily distinct partitions of n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 5, 6, 4, 1, 1, 7, 14, 10, 5, 1, 1, 11, 25, 30, 15, 6, 1, 1, 15, 53, 65, 55, 21, 7, 1, 1, 22, 89, 173, 140, 91, 28, 8, 1, 1, 30, 167, 343, 448, 266, 140, 36, 9, 1, 1, 42, 278, 778, 1022, 994, 462, 204, 45, 10, 1, 1, 56, 480, 1518, 2710, 2562, 1974, 750, 285, 55, 11, 1
Offset: 1

Author

N. J. A. Sloane, Jun 05 2012

Keywords

Examples

			The array begins:
  1,  1,   1,   1,    1,    1,     1,     1,     1,      1, ...
  1,  2,   3,   4,    5,    6,     7,     8,     9,     10, ...
  1,  3,   6,  10,   15,   21,    28,    36,    45,     55, ...
  1,  5,  14,  30,   55,   91,   140,   204,   285,    385, ...
  1,  7,  25,  65,  140,  266,   462,   750,  1155,   1705, ...
  1, 11,  53, 173,  448,  994,  1974,  3606,  6171,  10021, ...
  1, 15,  89, 343, 1022, 2562,  5670, 11418, 21351,  37609, ...
  1, 22, 167, 778, 2710, 7764, 19314, 43164, 88671, 170170, ...
  ...
		

Crossrefs

Main diagonal gives A284645.

Programs

  • Maple
    with(combinat):
    g:= proc(n, m) option remember;
          `if`(m>1, map(x-> map(y-> sort([x[], y[]]), g(n, 1))[],
           g(n, m-1)), `if`(m=1, map(x->map(y-> `if`(y>1, y-1, NULL), x),
           {partition(n)[]}), {[]}))
        end:
    T:= (n, m)-> nops(g(n, m)):
    seq(seq(T(d-m, m), m=0..d-1), d=1..12);  # Alois P. Heinz, Jul 11 2012
  • Mathematica
    T[n_, m_] := Module[{ip, lg, i}, ip = IntegerPartitions[n]; lg = Length[ ip]; i[0]=1; Table[Join[Sequence @@ Table[ip[[i[k]]], {k, 1, m}]] // Sort, Evaluate[Sequence @@ Table[{i[k], i[k-1], lg}, {k, 1, m}]]] // Flatten[#, m-1]& // Union // Length]; T[_, 0] = 1;
    Table[T[n-m, m], {n, 1, 12}, {m, 0, n - 1}] // Flatten (* Jean-François Alcover, May 25 2016 *)

Formula

Row n is a polynomial in m: see A213074 for the coefficients.

Extensions

More terms and cross-references from Alois P. Heinz, Jul 11 2012

A002220 a(n) is the number of partitions of 3n that can be obtained by adding together three (not necessarily distinct) partitions of n.

Original entry on oeis.org

1, 4, 10, 30, 65, 173, 343, 778, 1518, 3088, 5609, 10959, 18990, 34441, 58903, 102044, 167499, 282519, 451529, 737208, 1160102, 1836910, 2828466, 4410990, 6670202, 10161240, 15186315, 22758131, 33480869
Offset: 1

Keywords

Examples

			From _Gus Wiseman_, Apr 20 2024: (Start)
The a(1) = 1 through a(3) = 10 triquanimous partitions:
  (111)  (222)     (333)
         (2211)    (3321)
         (21111)   (32211)
         (111111)  (33111)
                   (222111)
                   (321111)
                   (2211111)
                   (3111111)
                   (21111111)
                   (111111111)
(End)
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A002219 for further details. Cf. A002221, A002222, A213074.
A column of A213086.
For biquanimous we have A002219, ranks A357976.
For non-biquanimous we have A371795, ranks A371731, even case A006827.
The Heinz numbers of these partitions are given by A371955.
The strict case is A372122.
A321451 counts non-quanimous partitions, ranks A321453.
A321452 counts quanimous partitions, ranks A321454.
A371783 counts k-quanimous partitions.

Extensions

Edited by N. J. A. Sloane, Jun 03 2012
a(12)-a(20) from Alois P. Heinz, Jul 10 2012
a(21)-a(29) from Sean A. Irvine, Sep 05 2013

A002222 a(n) is the number of partitions of 5n that can be obtained by adding together five (not necessarily distinct) partitions of n.

Original entry on oeis.org

1, 6, 21, 91, 266, 994, 2562, 7764, 19482, 51212, 116028, 288541, 612463, 1375609, 2862437, 6036606, 11846488, 24080685, 45506290
Offset: 1

Keywords

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A002219 for further details. Cf. A000041, A002220, A002221, A213074.
A column of A213086.

Extensions

Edited by N. J. A. Sloane, Jun 03 2012
a(12)-a(13) from Alois P. Heinz, Jul 10 2012
a(14)-a(19) from Sean A. Irvine, Sep 06 2013

A371955 Numbers with triquanimous prime indices.

Original entry on oeis.org

8, 27, 36, 48, 64, 125, 150, 180, 200, 216, 240, 288, 320, 343, 384, 441, 490, 512, 567, 588, 630, 700, 729, 756, 784, 810, 840, 900, 972, 1000, 1008, 1080, 1120, 1200, 1296, 1331, 1344, 1440, 1600, 1694, 1728, 1792, 1815, 1920, 2156, 2178, 2197, 2304, 2310
Offset: 1

Author

Gus Wiseman, Apr 19 2024

Keywords

Comments

A finite multiset of numbers is defined to be triquanimous iff it can be partitioned into three multisets with equal sums.
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

			The terms together with their prime indices begin:
     8: {1,1,1}
    27: {2,2,2}
    36: {1,1,2,2}
    48: {1,1,1,1,2}
    64: {1,1,1,1,1,1}
   125: {3,3,3}
   150: {1,2,3,3}
   180: {1,1,2,2,3}
   200: {1,1,1,3,3}
   216: {1,1,1,2,2,2}
   240: {1,1,1,1,2,3}
   288: {1,1,1,1,1,2,2}
   320: {1,1,1,1,1,1,3}
   343: {4,4,4}
   384: {1,1,1,1,1,1,1,2}
   441: {2,2,4,4}
   490: {1,3,4,4}
   512: {1,1,1,1,1,1,1,1,1}
   567: {2,2,2,2,4}
   588: {1,1,2,4,4}
		

Crossrefs

These are the Heinz numbers of the partitions counted by A002220.
For biquanimous we have A357976, counted by A002219.
For non-biquanimous we have A371731, counted by A371795, even case A006827.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A237258 (aerated) counts biquanimous strict partitions, ranks A357854.
A371783 counts k-quanimous partitions.

Programs

  • Maple
    tripart:= proc(L) local t,X,Y,n,cons,i,R;
      t:= convert(L,`+`)/3;
      n:= nops(L);
      if not t::integer then return false fi;
      cons:= [add(L[i]*X[i],i=1..n)=t,
              add(L[i]*Y[i],i=1..n)=t,
              seq(X[i] + Y[i] <= 1, i=1..n)];
      R:= traperror(Optimization:-Maximize(0, cons, assume=binary));
      R::list
    end proc:
    primeindices:= proc(n) local F,t;
      F:= ifactors(n)[2];
      map(t -> numtheory:-pi(t[1])$t[2], F)
    end proc:
    select(tripart @ primindices, [$2..3000]); # Robert Israel, May 19 2025
  • Mathematica
    hwt[n_]:=Total[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[1000],Select[facs[#], Length[#]==3&&SameQ@@hwt/@#&]!={}&]

A371954 Triangle read by rows where T(n,k) is the number of integer partitions of n that can be partitioned into k multisets with equal sums (k-quanimous).

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 3, 0, 1, 0, 5, 3, 0, 1, 0, 7, 0, 0, 0, 1, 0, 11, 6, 4, 0, 0, 1, 0, 15, 0, 0, 0, 0, 0, 1, 0, 22, 14, 0, 5, 0, 0, 0, 1, 0, 30, 0, 10, 0, 0, 0, 0, 0, 1, 0, 42, 25, 0, 0, 6, 0, 0, 0, 0, 1, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 77, 53, 30, 15, 0, 7, 0, 0, 0, 0, 0, 1
Offset: 0

Author

Gus Wiseman, Apr 20 2024

Keywords

Comments

A finite multiset of numbers is defined to be k-quanimous iff it can be partitioned into k multisets with equal sums.

Examples

			Triangle begins:
  1
  0  1
  0  2  1
  0  3  0  1
  0  5  3  0  1
  0  7  0  0  0  1
  0 11  6  4  0  0  1
  0 15  0  0  0  0  0  1
  0 22 14  0  5  0  0  0  1
  0 30  0 10  0  0  0  0  0  1
  0 42 25  0  0  6  0  0  0  0  1
  0 56  0  0  0  0  0  0  0  0  0  1
  0 77 53 30 15  0  7  0  0  0  0  0  1
Row n = 6 counts the following partitions:
  .  (6)       (33)      (222)     .  .  (111111)
     (51)      (321)     (2211)
     (42)      (3111)    (21111)
     (411)     (2211)    (111111)
     (33)      (21111)
     (321)     (111111)
     (3111)
     (222)
     (2211)
     (21111)
     (111111)
		

Crossrefs

Row n has A000005(n) positive entries.
Column k = 1 is A000041.
Column k = 2 is A002219 (aerated), ranks A357976.
Column k = 3 is A002220 (aerated), ranks A371955.
Removing all zeros gives A371783.
Row sums are A372121.
A321451 counts non-quanimous partitions, ranks A321453.
A321452 counts quanimous partitions, ranks A321454.
A371789 counts non-quanimous sets, complement A371796.

Programs

  • Mathematica
    hwt[n_]:=Total[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]]}]];
    Table[Length[Select[IntegerPartitions[n], Select[facs[Times@@Prime/@#], Length[#]==k&&SameQ@@hwt/@#&]!={}&]],{n,0,10},{k,0,n}]
Showing 1-8 of 8 results.