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

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

A035294 Number of ways to partition 2n into distinct positive integers.

Original entry on oeis.org

1, 1, 2, 4, 6, 10, 15, 22, 32, 46, 64, 89, 122, 165, 222, 296, 390, 512, 668, 864, 1113, 1426, 1816, 2304, 2910, 3658, 4582, 5718, 7108, 8808, 10880, 13394, 16444, 20132, 24576, 29927, 36352, 44046, 53250, 64234, 77312, 92864, 111322, 133184, 159046
Offset: 0

Views

Author

Keywords

Comments

Also, number of partitions of 2n into odd numbers. - Vladeta Jovovic, Aug 17 2004
This sequence was originally defined as the expansion of sum ( q^n / product( 1-q^k, k=1..2*n), n=0..inf ). The present definition is due to Reinhard Zumkeller. Michael Somos points out that the equivalence of the two definitions follows from Andrews, page 19.
Also, number of partitions of 2n with max descent 1 and last part 1. - Wouter Meeussen, Mar 31 2013

Examples

			a(4)=6 [8=7+1=6+2=5+3=5+2+1=4+3+1=2*4].
G.f. = 1 + x + 2*x^2 + 4*x^3 + 6*x^4 + 10*x^5 + 15*x^6 + 22*x^7 + 46*x^9 + ...
G.f. = q + q^49 + 2*q^97 + 4*q^145 + 6*q^193 + 10*q^241 + 15*q^289 + ...
		

References

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

Crossrefs

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral)
    a035294 n = a035294_list !! n
    a035294_list = f 1 where
       f x = (p' 1 (x - 1)) : 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
    b:= proc(n, i) option remember; `if`(n=0, 1,
         `if`(i<1, 0, b(n, i-2)+`if`(i>n, 0, b(n-i, i))))
        end:
    a:= n-> b(2*n, 2*n-1):
    seq(a(n), n=0..50);  # Alois P. Heinz, Feb 11 2015
  • Mathematica
    Table[Count[IntegerPartitions[2 n], q_ /; Union[q] == Sort[q]], {n, 16}];
    Table[Count[IntegerPartitions[2 n], q_ /; Count[q, _?EvenQ] == 0], {n, 16}];
    Table[Count[IntegerPartitions[2 n], q_ /; Last[q] == 1 && Max[q - PadRight[Rest[q], Length[q]]] <= 1 ], {n, 16}];
    (* Wouter Meeussen, Mar 31 2013 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ x^2] /QPochhammer[ x], {x, 0, 2 n}]; (* Michael Somos, May 06 2015 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ -x^3, x^8] QPochhammer[ -x^5, x^8] QPochhammer[ x^8] / QPochhammer[ x], {x, 0, n}]; (* Michael Somos, May 06 2015 *)
    nmax=60; CoefficientList[Series[Product[(1+x^(8*k+1)) * (1+x^(8*k+2))^2 * (1+x^(8*k+3))^2 * (1+x^(8*k+4))^3 * (1+x^(8*k+5))^2 * (1+x^(8*k+6))^2 * (1+x^(8*k+7)) * (1+x^(8*k+8))^3, {k,0,nmax}],{x,0,nmax}],x] (* Vaclav Kotesovec, Oct 06 2015 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-2] + If[i>n, 0, b[n-i, i]]]]; a[n_] := b[2n, 2n-1]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Aug 30 2016, after Alois P. Heinz *)
  • PARI
    {a(n) = my(A); if( n<0, 0, n*=2; A = x * O(x^n); polcoeff( eta(x^2 + A) / eta(x + A), n))};/* Michael Somos, Nov 01 2005 */
    

Formula

a(n) = A000009(2*n). - Michael Somos, Mar 03 2003
Expansion of Sum_{n >= 0} q^n / Product_{k = 1..2*n} (1 - q^k).
a(n) = T(2*n, 0), T as defined in A026835.
G.f.: Product_{i >= 0} ((1 + x^(8*i + 1)) * (1 + x^(8*i + 2))^2 * (1 + x^(8*i + 3))^2 * (1 + x^(8*i + 4))^3 * (1 + x^(8*i + 5))^2 * (1 + x^(8*i + 6))^2 * (1 + x^(8*i + 7)) * (1 + x^(8*i + 8))^3). - Vladeta Jovovic, Oct 10 2004
G.f.: (Sum_{k>=0} x^A074378(k)) / (Product_{k>0} (1 - x^k)) = f( x^3, x^5) / f(-x, -x^2) where f(, ) is Ramanujan's general theta function. - Michael Somos, Nov 01 2005
Euler transform of period 16 sequence [1, 1, 2, 1, 2, 0, 1, 0, 1, 0, 2, 1, 2, 1, 1, 0, ...]. - Michael Somos, Dec 17 2002
a(n) ~ exp(sqrt(2*n/3)*Pi) / (2^(11/4) * 3^(1/4) * n^(3/4)). - Vaclav Kotesovec, Oct 06 2015
a(n) = A000041(n) + A282893(n). - Michael Somos, Feb 24 2017
Convolution with A000041 is A058696. - Michael Somos, Feb 24 2017
Convolution with A097451 is A262987. - Michael Somos, Feb 24 2017
G.f.: 1/(1 - x)*Sum_{n>=0} x^floor((3*n+1)/2)/Product_{k = 1..n} (1 - x^k). - Peter Bala, Feb 04 2021
G.f.: Product_{n >= 1} (1 - q^(8*n))*(1 + q^(8*n-3))*(1 + q^(8*n-5))/(1 - q^n). - Peter Bala, Dec 30 2024

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

A282892 The difference between the number of partitions of n into odd parts (A000009) and the number of partitions of n into even parts (A035363).

Original entry on oeis.org

0, 1, 0, 2, 0, 3, 1, 5, 1, 8, 3, 12, 4, 18, 7, 27, 10, 38, 16, 54, 22, 76, 33, 104, 45, 142, 64, 192, 87, 256, 120, 340, 159, 448, 215, 585, 283, 760, 374, 982, 486, 1260, 634, 1610, 814, 2048, 1049, 2590, 1335, 3264, 1700, 4097, 2146, 5120, 2708, 6378, 3390, 7917, 4243, 9792, 5276
Offset: 0

Views

Author

Robert G. Wilson v, Feb 24 2017

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, t) option remember; `if`(n=0, 1, add(add(`if`(
          (d+t)::odd, d, 0), d=divisors(j))*b(n-j, t), j=1..n)/n)
        end:
    a:= n-> b(n, 0) -b(n, 1):
    seq(a(n), n=0..80);  # Alois P. Heinz, Feb 24 2017
  • Mathematica
    f[n_] := Length[ IntegerPartitions[n, All, 2Range[n] -1]] - Length[ IntegerPartitions[n, All, 2 Range[n]]]; Array[f, 60]
    (* Second program: *)
    b[n_, t_] := b[n, t] = If[n == 0, 1, Sum[Sum[If[
         OddQ[d+t], d, 0], {d, Divisors[j]}]*b[n-j, t], {j, 1, n}]/n];
    a[n_] := b[n, 0] - b[n, 1];
    a /@ Range[0, 80] (* Jean-François Alcover, Jun 06 2021, after Alois P. Heinz *)

Formula

a(2n-1) = A000009(2n-1) = A078408(n).
a(2n) = A282893(n).
Showing 1-4 of 4 results.