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-10 of 23 results. Next

A362608 Number of integer partitions of n having a unique mode.

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 7, 11, 16, 21, 29, 43, 54, 78, 102, 131, 175, 233, 295, 389, 490, 623, 794, 1009, 1255, 1579, 1967, 2443, 3016, 3737, 4569, 5627, 6861, 8371, 10171, 12350, 14901, 18025, 21682, 26068, 31225, 37415, 44617, 53258, 63313, 75235, 89173, 105645
Offset: 0

Views

Author

Gus Wiseman, Apr 30 2023

Keywords

Comments

A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes of {a,a,b,b,b,c,d,d,d} are {b,d}.

Examples

			The partition (3,3,2,1) has greatest multiplicity 2, and a unique part of multiplicity 2 (namely 3), so is counted under a(9).
The a(1) = 1 through a(7) = 11 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (111)  (22)    (221)    (33)      (322)
                    (211)   (311)    (222)     (331)
                    (1111)  (2111)   (411)     (511)
                            (11111)  (3111)    (2221)
                                     (21111)   (3211)
                                     (111111)  (4111)
                                               (22111)
                                               (31111)
                                               (211111)
                                               (1111111)
		

Crossrefs

For parts instead of multiplicities we have A000041(n-1), ranks A102750.
For median instead of mode we have A238478, complement A238479.
These partitions have ranks A356862.
The complement is counted by A362607, ranks A362605.
For co-mode complement we have A362609, ranks A362606.
For co-mode we have A362610, ranks A359178.
A275870 counts collapsible partitions.
A359893 counts partitions by median.
A362611 counts modes in prime factorization, co-modes A362613.
A362614 counts partitions by number of modes, co-modes A362615.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Length[Commonest[#]]==1&]],{n,0,30}]
  • PARI
    seq(n) = my(A=O(x*x^n)); Vec(sum(m=1, n, sum(j=1, n\m, x^(j*m)*(1-x^j)/(1 - x^(j*m)), A)*prod(j=1, n\m, (1 - x^(j*m))/(1 - x^j) + A)/prod(j=n\m+1, n, 1 - x^j + A)), -(n+1)) \\ Andrew Howroyd, May 04 2023

Formula

G.f.: Sum_{m>=1} (Sum_{j>=1} x^(j*m)*(1 - x^j)/(1 - x^(j*m))) * (Product_{j>=1} (1 - x^(j*m))/(1 - x^j)). - Andrew Howroyd, May 04 2023

A078408 Number of ways to partition 2n+1 into distinct positive integers.

Original entry on oeis.org

1, 2, 3, 5, 8, 12, 18, 27, 38, 54, 76, 104, 142, 192, 256, 340, 448, 585, 760, 982, 1260, 1610, 2048, 2590, 3264, 4097, 5120, 6378, 7917, 9792, 12076, 14848, 18200, 22250, 27130, 32992, 40026, 48446, 58499, 70488, 84756, 101698, 121792, 145578, 173682
Offset: 0

Views

Author

N. J. A. Sloane, Dec 27 2002

Keywords

Comments

a(n) is also the number of partitions of 2n+1 in which all parts are odd, due to Euler's partition theorem. See A000009. - Wolfdieter Lang, Jul 08 2012

Examples

			a(3) = 5 because 7 = 1+6 = 2+5 = 3+4 = 1+2+4 (partitions into distinct parts) and 7 = 1+1+5 = 1+3+3 = 1+1+1+1+3 = 1+1+1+1+1+1+1 (partitions into odd parts). [_Wolfdieter Lang_, Jul 08 2012]
G.f. = 1 + 2*x + 3*x^2 + 5*x^3 + 8*x^4 + 12*x^5 + 18*x^6 + 27*x^7 + 38*x^8 + ...
G.f. = q^25 + 2*q^73 + 3*q^121 + 5*q^169 + 8*q^217 + 12*q^265 + 18*q^313 + ...
		

References

  • G. E. Andrews, The Theory of Partitions, Cambridge University Press, 1998, p. 19.

Crossrefs

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral)
    a078408 n = a078408_list !! n
    a078408_list = f 1 where
       f x = (p' 1 x) : f (x + 2)
       p' = memo2 integral integral p
       p _ 0 = 1
       p k m = if m < k then 0 else p' k (m - k) + p' (k + 2) m
    -- Reinhard Zumkeller, Nov 27 2015
  • Maple
    G := 1/(1 - x)*add(x^floor(3*n/2)/mul(1 - x^k, k = 1..n), n = 0..50):
    S := series(G, x, 76):
    seq(coeff(S, x, j), j = 0..75); # Peter Bala, Feb 04 2021
  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ x^2] / QPochhammer[ x], {x, 0, 2 n + 1}]; (* Michael Somos, Oct 06 2015 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, n = 2*n + 1; A = x * O(x^n); polcoeff( eta(x^2 + A) / eta(x + A), n))};
    

Formula

a(n) = t(2*n+1, 0), t as defined in A079211.
Euler transform of period 16 sequence [ 2, 0, 1, 1, 1, 1, 2, 0, 2, 1, 1, 1, 1, 0, 2, 0, ...]. - Michael Somos, Mar 04 2003
a(n) = A000009(2*n+1). G.f. of A000009: 1/[(1 - x)*(1 - x^3)*(1 - x^5)*...] - Jon Perry, May 27 2004
Expansion of f(x, x^7) / f(-x, -x^2) where f(, ) is Ramanujan's general theta function. - Michael Somos, Oct 06 2015
From Peter Bala, Feb 04 2021: (Start)
G.f.: Sum_{n >= 0} x^n/Product_{k = 1..2*n+1} 1 - x^k. Replace q with q^2 and set t = q in Andrews, equation 2.2.5, p. 19, and then take the odd part of the series.
G.f.: 1/(1 - x)*Sum_{n >= 0} x^floor(3*n/2)/Product_{k = 1..n} (1 - x^k). (End)
a(n) = A282893(n+1) + A238478(n+1) = A035294(n+1) - A238479(n+1). - Mathew Englander, May 24 2023
G.f.: Product_{n >= 1} (1 - q^(8*n))*(1 + q^(8*n-1))*(1 + q^(8*n-7))/(1 - q^n). - Peter Bala, Dec 30 2024
a(n) ~ exp(Pi*sqrt(2*n/3)) / (2^(11/4)*3^(1/4)*n^(3/4)). - Vaclav Kotesovec, Jul 06 2025

Extensions

More terms from Reinhard Zumkeller, Dec 28 2002

A362610 Number of integer partitions of n having a unique part of least multiplicity.

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 7, 10, 13, 16, 23, 30, 35, 50, 61, 73, 95, 123, 139, 187, 216, 269, 328, 411, 461, 594, 688, 836, 980, 1211, 1357, 1703, 1936, 2330, 2697, 3253, 3649, 4468, 5057, 6005, 6841, 8182, 9149, 10976, 12341, 14508, 16447, 19380, 21611, 25553, 28628
Offset: 0

Views

Author

Gus Wiseman, Apr 30 2023

Keywords

Comments

Alternatively, these are partitions with a part appearing fewer times than each of the others.

Examples

			The partition (3,3,2,2,2,1,1,1) has least multiplicity 2, and only one part of multiplicity 2 (namely 3), so is counted under a(15).
The a(1) = 1 through a(8) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (221)    (33)      (322)      (44)
                    (211)   (311)    (222)     (331)      (332)
                    (1111)  (2111)   (411)     (511)      (422)
                            (11111)  (3111)    (2221)     (611)
                                     (21111)   (4111)     (2222)
                                     (111111)  (22111)    (5111)
                                               (31111)    (22211)
                                               (211111)   (41111)
                                               (1111111)  (221111)
                                                          (311111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

For parts instead of multiplicities we have A002865, ranks A247180.
For median instead of co-mode we have A238478, complement A238479.
These partitions have ranks A359178.
For mode complement of co-mode we have A362607, ranks A362605.
For mode instead of co-mode we have A362608, ranks A356862.
The complement is counted by A362609, ranks A362606.
A000041 counts integer partitions.
A275870 counts collapsible partitions.
A359893 counts partitions by median.
A362611 counts modes in prime factorization, co-modes A362613.
A362614 counts partitions by number of modes, co-modes A362615.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Count[Length/@Split[#],Min@@Length/@Split[#]]==1&]],{n,0,30}]
  • PARI
    seq(n) = my(A=O(x*x^n)); Vec(sum(m=2, n+1, sum(j=1, n, x^(j*(m-1))/(1 + if(j*m<=n, x^(j*m)/(1-x^j) )) + A)*prod(j=1, n\m, 1 + x^(j*m)/(1 - x^j) + A)), -(n+1)) \\ Andrew Howroyd, May 04 2023

Formula

G.f.: Sum_{m>=2} (Sum_{j>=1} x^(j*(m-1))/(1 + x^(j*m)/(1 - x^j))) * (Product_{j>=1} (1 + x^(j*m)/(1 - x^j))). - Andrew Howroyd, May 04 2023

A362607 Number of integer partitions of n with more than one mode.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 4, 4, 6, 9, 13, 13, 23, 23, 33, 45, 56, 64, 90, 101, 137, 169, 208, 246, 320, 379, 469, 567, 702, 828, 1035, 1215, 1488, 1772, 2139, 2533, 3076, 3612, 4333, 5117, 6113, 7168, 8557, 10003, 11862, 13899, 16385, 19109, 22525, 26198, 30729, 35736
Offset: 0

Views

Author

Gus Wiseman, Apr 30 2023

Keywords

Comments

A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes of {a,a,b,b,b,c,d,d,d} are {b,d}.

Examples

			The partition (3,2,2,1,1) has greatest multiplicity 2, and two parts of multiplicity 2 (namely 1 and 2), so is counted under a(9).
The a(3) = 1 through a(9) = 9 partitions:
  (21)  (31)  (32)  (42)    (43)   (53)    (54)
              (41)  (51)    (52)   (62)    (63)
                    (321)   (61)   (71)    (72)
                    (2211)  (421)  (431)   (81)
                                   (521)   (432)
                                   (3311)  (531)
                                           (621)
                                           (32211)
                                           (222111)
		

Crossrefs

For parts instead of multiplicities we have A002865.
For median instead of mode we have A238479, complement A238478.
These partitions have ranks A362605.
The complement is counted by A362608, ranks A356862.
For co-mode we have A362609, ranks A362606.
For co-mode complement we have A362610, ranks A359178.
A000041 counts integer partitions.
A359893 counts partitions by median.
A362611 counts modes in prime factorization, co-modes A362613.
A362614 counts partitions by number of modes, co-modes A362615.

Programs

  • Maple
    b:= proc(n, i, m, t) option remember; `if`(n=0, `if`(t=2, 1, 0), `if`(i<1, 0,
          add(b(n-i*j, i-1, max(j, m), `if`(j>m, 1, `if`(j=m, 2, t))), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0$2):
    seq(a(n), n=0..51);  # Alois P. Heinz, May 05 2024
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Length[Commonest[#]]>1&]],{n,0,30}]
  • PARI
    G_x(N)={my(x='x+O('x^(N-1)), Ib(k,j) = if(k>j,1,0), A_x(u)=sum(i=1,N-u, sum(j=u+1, N-u, (x^(i*(u+j))*(1-x^u)*(1-x^j))/((1-x^(u*i))*(1-x^(j*i))) * prod(k=1,N-i*(u+j), (1-x^(k*(i+Ib(k,j))))/(1-x^k)))));
    concat([0,0,0],Vec(sum(u=1,N, A_x(u))))}
    G_x(51) \\ John Tyler Rascoe, Apr 05 2024

Formula

G.f.: Sum_{u>0} A(u,x) where A(u,x) = Sum_{i>0} Sum_{j>u} ( x^(i*(u+j))*(1-x^u)*(1-x^j) )/( (1-x^(u*i))*(1-x^(j*i)) ) * Product_{k>0} ( (1-x^(k*(i+[k>j])))/(1-x^k) ) is the g.f. for partitions of this kind with least mode u and [] is the Iverson bracket. - John Tyler Rascoe, Apr 05 2024

A362612 Number of integer partitions of n such that the greatest part is the unique mode.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 4, 6, 6, 7, 9, 10, 12, 15, 16, 19, 23, 26, 32, 37, 41, 48, 58, 65, 75, 88, 101, 115, 135, 151, 176, 200, 228, 261, 300, 336, 385, 439, 498, 561, 641, 717, 818, 921, 1036, 1166, 1321, 1477, 1667, 1867, 2099, 2346, 2640, 2944, 3303, 3684
Offset: 0

Views

Author

Gus Wiseman, May 03 2023

Keywords

Comments

A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes of {a,a,b,b,b,c,d,d,d} are {b,d}.

Examples

			The a(1) = 1 through a(10) = 7 partitions (A = 10):
  1  2   3    4     5      6       7        8         9          A
     11  111  22    221    33      331      44        333        55
              1111  11111  222     2221     332       441        442
                           111111  1111111  2222      3321       3331
                                            22211     22221      22222
                                            11111111  111111111  222211
                                                                 1111111111
		

Crossrefs

For median instead of mode we have A053263, complement A237821.
These partitions have ranks A362616.
A000041 counts integer partitions.
A275870 counts collapsible partitions.
A359893 counts partitions by median.
A362607 counts partitions with more than one mode, ranks A362605.
A362608 counts partitions with a unique mode, ranks A356862.
A362611 counts modes in prime factorization.
A362614 counts partitions by number of modes, co-modes A362615.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Commonest[#]=={Max[#]}&]],{n,0,30}]
  • PARI
    A_x(N)={my(x='x+O('x^N), g=sum(i=1, N, sum(j=1, N/i, x^(i*j)*prod(k=1,i-1,(1-x^(j*k))/(1-x^k))))); concat([0],Vec(g))}
    A_x(60) \\ John Tyler Rascoe, Apr 03 2024

Formula

G.f.: Sum_{i, j>0} x^(i*j) * Product_{k=1,i-1} ((1-x^(j*k))/(1-x^k)). - John Tyler Rascoe, Apr 03 2024

A362609 Number of integer partitions of n with more than one part of least multiplicity.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 4, 5, 9, 14, 19, 26, 42, 51, 74, 103, 136, 174, 246, 303, 411, 523, 674, 844, 1114, 1364, 1748, 2174, 2738, 3354, 4247, 5139, 6413, 7813, 9613, 11630, 14328, 17169, 20958, 25180, 30497, 36401, 44025, 52285, 62834, 74626, 89111, 105374, 125662
Offset: 0

Views

Author

Gus Wiseman, Apr 30 2023

Keywords

Comments

These are partitions where no part appears fewer times than all of the others.

Examples

			The partition (4,2,2,1) has least multiplicity 1, and two parts of multiplicity 1 (namely 1 and 4), so is counted under a(9).
The a(3) = 1 through a(9) = 14 partitions:
  (21)  (31)  (32)  (42)    (43)    (53)     (54)
              (41)  (51)    (52)    (62)     (63)
                    (321)   (61)    (71)     (72)
                    (2211)  (421)   (431)    (81)
                            (3211)  (521)    (432)
                                    (3221)   (531)
                                    (3311)   (621)
                                    (4211)   (3321)
                                    (32111)  (4221)
                                             (4311)
                                             (5211)
                                             (42111)
                                             (222111)
                                             (321111)
		

Crossrefs

For parts instead of multiplicities we have A117989, ranks A283050.
For median instead of co-mode we have A238479, complement A238478.
These partitions have ranks A362606.
For mode instead of co-mode we have A362607, ranks A362605.
For mode complement instead of co-mode we have A362608, ranks A356862.
The complement is counted by A362610, ranks A359178.
A000041 counts integer partitions.
A275870 counts collapsible partitions.
A359893 counts partitions by median.
A362611 counts modes in prime factorization, co-modes A362613.
A362614 counts partitions by number of modes, co-modes A362615.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Count[Length/@Split[#],Min@@Length/@Split[#]]>1&]],{n,0,30}]

A118096 Number of partitions of n such that the largest part is twice the smallest part.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 3, 4, 6, 6, 6, 10, 9, 11, 13, 14, 15, 20, 18, 23, 25, 27, 27, 37, 35, 39, 43, 48, 49, 61, 57, 68, 72, 78, 81, 97, 95, 107, 114, 127, 128, 150, 148, 168, 179, 191, 198, 229, 230, 254, 266, 291, 300, 338, 344, 379, 398, 427, 444, 498, 505, 550, 580, 625
Offset: 1

Views

Author

Emeric Deutsch, Apr 12 2006

Keywords

Comments

Also number of partitions of n such that if the largest part occurs k times, then the number of parts is 2k. Example: a(8)=4 because we have [7,1], [6,2], [5,3] and [3,3,1,1].

Examples

			a(8)=4 because we have [4,2,2], [2,2,2,1,1], [2,2,1,1,1,1] and [2,1,1,1,1,1,1].
		

Crossrefs

Programs

  • Maple
    g:=sum(x^(3*k)/product(1-x^j,j=k..2*k),k=1..30): gser:=series(g,x=0,75): seq(coeff(gser,x,n),n=1..70);
    # second Maple program:
    b:= proc(n, i, t) option remember: `if`(n=0, 1, `if`(in, 0, b(n-i, i, t))))
        end:
    a:= n-> add(b(n-3*j, 2*j, j), j=1..n/3):
    seq(a(n), n=1..64);  # Alois P. Heinz, Sep 04 2017
  • Mathematica
    Table[Count[IntegerPartitions[n], p_ /; 2 Min[p] = = Max[p]], {n, 40}] (* Clark Kimberling, Feb 16 2014 *)
    (* Second program: *)
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i < t, 0,
         b[n, i - 1, t] + If[i > n, 0, b[n - i, i, t]]]];
    a[n_] := Sum[b[n - 3j, 2j, j], {j, 1, n/3}];
    Array[a, 64] (* Jean-François Alcover, Jun 04 2021, after Alois P. Heinz *)
    (* Third program: *)
    nmax = 100; p = 1; s = 0; Do[p = Simplify[p*(1 - x^(2*k - 1))*(1 - x^(2*k))/(1 - x^k)]; p = Normal[p + O[x]^(nmax+1)]; s += x^(3*k)/(1 - x^k)/p;, {k, 1, nmax}]; Rest[CoefficientList[Series[s, {x, 0, nmax}], x]] (* Vaclav Kotesovec, Jun 16 2025 *)
  • PARI
    my(N=70, x='x+O('x^N)); concat([0, 0], Vec(sum(k=1, N, x^(3*k)/prod(j=k, 2*k, 1-x^j)))) \\ Seiichi Manyama, May 14 2023

Formula

G.f.: Sum_{k>=1} x^(3*k)/Product_{j=k..2*k} (1-x^j).
a(n) ~ exp(Pi*sqrt(2*n/15)) / (5^(1/4)*sqrt(2*phi*n)), where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Jun 13 2025

A237824 Number of partitions of n such that 2*(least part) >= greatest part.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 7, 10, 11, 13, 14, 19, 18, 23, 25, 29, 30, 38, 37, 46, 48, 54, 57, 70, 69, 80, 85, 97, 100, 118, 118, 137, 144, 159, 168, 193, 195, 220, 233, 259, 268, 303, 311, 348, 367, 399, 419, 469, 483, 532, 560, 610, 639, 704, 732, 801, 841, 908, 954
Offset: 1

Views

Author

Clark Kimberling, Feb 16 2014

Keywords

Comments

By conjugation, also the number of integer partitions of n whose greatest part appears at a middle position, namely at k/2, (k+1)/2, or (k+2)/2 where k is the number of parts. These partitions have ranks A362622. - Gus Wiseman, May 14 2023

Examples

			a(6) = 7 counts these partitions:  6, 42, 33, 222, 2211, 21111, 111111.
From _Gus Wiseman_, May 14 2023: (Start)
The a(1) = 1 through a(8) = 10 partitions such that 2*(least part) >= greatest part:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (211)   (221)    (42)      (322)      (53)
                    (1111)  (2111)   (222)     (2221)     (332)
                            (11111)  (2211)    (22111)    (422)
                                     (21111)   (211111)   (2222)
                                     (111111)  (1111111)  (22211)
                                                          (221111)
                                                          (2111111)
                                                          (11111111)
The a(1) = 1 through a(8) = 10 partitions whose greatest part appears at a middle position:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (1111)  (221)    (51)      (61)       (62)
                            (11111)  (222)     (331)      (71)
                                     (2211)    (2221)     (332)
                                     (111111)  (1111111)  (2222)
                                                          (3311)
                                                          (22211)
                                                          (11111111)
(End)
		

Crossrefs

The complement is counted by A237820, ranks A362982.
For modes instead of middles we have A362619, counted by A171979.
These partitions have ranks A362981.
A000041 counts integer partitions, strict A000009.
A325347 counts partitions with integer median, complement A307683.

Programs

  • Mathematica
    z = 60; q[n_] := q[n] = IntegerPartitions[n];
    Table[Count[q[n], p_ /; 2 Min[p] < Max[p]], {n, z}]  (* A237820 *)
    Table[Count[q[n], p_ /; 2 Min[p] <= Max[p]], {n, z}] (* A237821 *)
    Table[Count[q[n], p_ /; 2 Min[p] == Max[p]], {n, z}] (* A118096 *)
    Table[Count[q[n], p_ /; 2 Min[p] > Max[p]], {n, z}]  (* A053263 *)
    Table[Count[q[n], p_ /; 2 Min[p] >= Max[p]], {n, z}] (* this sequence *)
    (* or *)
    nmax = 100; Rest[CoefficientList[Series[Sum[x^k/Product[1 - x^j, {j,k,2*k}], {k, 1, nmax}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Jun 13 2025 *)
    (* or *)
    nmax = 100; p = 1; s = 0; Do[p = Simplify[p*(1 - x^(2*k - 1))*(1 - x^(2*k))/(1 - x^k)]; p = Normal[p + O[x]^(nmax+1)]; s += x^k/(1 - x^k)/p;, {k, 1, nmax}]; Rest[CoefficientList[Series[s, {x, 0, nmax}], x]] (* Vaclav Kotesovec, Jun 14 2025 *)
  • PARI
    N=60; x='x+O('x^N);
    gf = sum(m=1, N, (x^m)/(1-x^m)) + sum(i=1, N, sum(j=1, i, x^((2*i)+j)/prod(k=0, j, 1 - x^(k+i))));
    Vec(gf) \\ John Tyler Rascoe, Mar 07 2024

Formula

G.f.: Sum_{m>0} x^m/(1-x^m) + Sum_{i>0} Sum_{j=1..i} x^((2*i)+j) / Product_{k=0..j} (1 - x^(k+i)). - John Tyler Rascoe, Mar 07 2024
G.f.: Sum_{k>=1} x^k / Product_{j=k..2*k} (1 - x^j). - Vaclav Kotesovec, Jun 13 2025
a(n) ~ phi^(3/2) * exp(Pi*sqrt(2*n/15)) / (5^(1/4) * sqrt(2*n)), where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Jun 14 2025

A238628 Number of partitions p of n such that n - max(p) is a part of p.

Original entry on oeis.org

0, 1, 1, 3, 2, 5, 3, 8, 4, 11, 5, 16, 6, 21, 7, 29, 8, 38, 9, 51, 10, 66, 11, 88, 12, 113, 13, 148, 14, 190, 15, 246, 16, 313, 17, 402, 18, 508, 19, 646, 20, 812, 21, 1023, 22, 1277, 23, 1598, 24, 1982, 25, 2461, 26, 3036, 27, 3745, 28, 4593, 29, 5633
Offset: 1

Views

Author

Clark Kimberling, Mar 02 2014

Keywords

Comments

Also the number of integer partitions of n that are of length 2 or contain n/2. The first condition alone is A004526, complement A058984. The second condition alone is A035363, complement A086543, ranks A344415. - Gus Wiseman, Oct 07 2023

Examples

			a(6) counts these partitions:  51, 42, 33, 321, 3111.
		

Crossrefs

Cf. A238479.
The strict case is A365659, complement A365826.
The complement is counted by A365825.
These partitions are ranked by A366318.
A000041 counts integer partitions, strict A000009.
A140106 counts strict partitions of length 2, complement A365827.
A182616 counts partitions of 2n that do not contain n, strict A365828.

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n], p_ /; MemberQ[p, n - Max[p]]], {n, 50}]
  • PARI
    a(n) = my(res = floor(n/2)); if(!bitand(n, 1), res+=(numbpart(n/2)-1)); res
  • Python
    from sympy.utilities.iterables import partitions
    def A238628(n): return sum(1 for p in partitions(n) if n-max(p,default=0) in p) # Chai Wah Wu, Sep 21 2023
    

A238478 Number of partitions of n whose median is a part.

Original entry on oeis.org

1, 2, 2, 4, 5, 8, 11, 17, 22, 32, 43, 59, 78, 105, 136, 181, 233, 302, 386, 496, 626, 796, 999, 1255, 1564, 1951, 2412, 2988, 3674, 4516, 5524, 6753, 8211, 9984, 12086, 14617, 17617, 21211, 25450, 30514, 36475, 43550, 51869, 61707, 73230, 86821, 102706
Offset: 1

Views

Author

Clark Kimberling, Feb 27 2014

Keywords

Comments

Also the number of integer partitions of n with a unique middle part. This means that either the length is odd or the two middle parts are equal. For example, the partition (4,3,2,1) has middle parts {2,3} so is not counted under a(10), but (3,2,2,1) has middle parts {2,2} so is counted under a(8). - Gus Wiseman, May 13 2023

Examples

			a(6) counts these partitions:  6, 411, 33, 321, 3111, 222, 21111, 111111.
		

Crossrefs

For mean instead of median we have A237984, ranks A327473.
The complement is counted by A238479, ranks A362617.
These partitions have ranks A362618.
A000041 counts integer partitions.
A325347 counts partitions with integer median, complement A307683.
A359893/A359901/A359902 count partitions by median.
A359908 ranks partitions with integer median, complement A359912.

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n], p_ /; MemberQ[p, Median[p]]], {n, 40}]

Formula

a(n) + A238479(n) = A000041(n).
For all n, a(n) >= A027193(n) (because when a partition of n has an odd number of parts, its median is simply the part at the middle). - Antti Karttunen, Feb 27 2014
a(n) = A078408(n-1) - A282893(n). - Mathew Englander, May 24 2023
Showing 1-10 of 23 results. Next