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

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

A002221 a(n) is the number of partitions of 4n that can be obtained by adding together four (not necessarily distinct) partitions of n.

Original entry on oeis.org

1, 5, 15, 55, 140, 448, 1022, 2710, 6048, 14114, 28831, 64091, 123649, 251295, 476835, 916972, 1654044, 3080159, 5377431, 9624588, 16490017, 28433473, 47423409, 80279375
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. A002220, A002222, A213074.
A column of A213086.

Extensions

Edited by N. J. A. Sloane, Jun 03 2012
a(12)-a(16) from Alois P. Heinz, Jul 10 2012
a(17)-a(24) 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}]

A372122 Number of strict triquanimous partitions of 3n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 4, 5, 13, 18, 36, 51, 93, 132, 229, 315, 516, 735, 1134, 1575, 2407, 3309, 4878, 6710, 9690, 13168, 18744, 25114, 35050, 47210, 64503, 85573, 116445, 153328, 205367, 269383, 356668, 464268, 610644, 788274, 1026330, 1321017, 1704309, 2176054
Offset: 0

Author

Gus Wiseman, Apr 20 2024

Keywords

Comments

A finite multiset of numbers is defined to be triquanimous iff it can be partitioned into three multisets with equal sums. Triquanimous partitions are counted by A002220 and ranked by A371955.

Examples

			The partition (11,7,5,4,3,2,1) has qualifying set partitions {{11},{4,7},{1,2,3,5}} and {{11},{1,3,7},{2,4,5}} so is counted under a(11).
The a(5) = 1 through a(9) = 13 partitions:
  (5,4,3,2,1)  (6,5,4,2,1)  (7,5,4,3,2)    (8,6,5,3,2)    (9,6,5,4,3)
                            (7,6,4,3,1)    (8,7,5,3,1)    (9,7,5,4,2)
                            (7,6,5,2,1)    (8,7,6,2,1)    (9,7,6,3,2)
                            (6,5,4,3,2,1)  (7,6,5,3,2,1)  (9,8,5,4,1)
                                           (8,6,4,3,2,1)  (9,8,6,3,1)
                                                          (9,8,7,2,1)
                                                          (7,6,5,4,3,2)
                                                          (8,6,5,4,3,1)
                                                          (8,7,5,4,2,1)
                                                          (8,7,6,3,2,1)
                                                          (9,6,5,4,2,1)
                                                          (9,7,5,3,2,1)
                                                          (9,8,4,3,2,1)
		

Crossrefs

The non-strict biquanimous version is A002219, ranks A357976.
The non-strict version is A002220, ranks A371955.
The biquanimous version is A237258, ranks A357854.
A321451 counts non-quanimous partitions, ranks A321453.
A321452 counts quanimous partitions, ranks A321454, strict A371737.
A371783 counts k-quanimous partitions.
A371795 counts non-biquanimous partitions, even case A006827, ranks A371731.

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[3n], UnsameQ@@#&&Select[facs[Times@@Prime/@#], Length[#]==3&&SameQ@@hwt/@#&]!={}&]],{n,0,10}]

Extensions

More terms from Jinyuan Wang, Mar 30 2025
Showing 1-8 of 8 results.