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.

A045931 Number of partitions of n with equal number of even and odd parts.

This page as a plain text file.
%I A045931 #39 Jun 15 2025 04:56:34
%S A045931 1,0,0,1,0,2,1,3,2,5,5,7,9,11,16,18,25,28,41,44,62,70,94,107,140,163,
%T A045931 207,245,302,361,440,527,632,763,904,1090,1285,1544,1812,2173,2539,
%U A045931 3031,3538,4202,4896,5793,6736,7934,9221,10811,12549,14661,16994,19780
%N A045931 Number of partitions of n with equal number of even and odd parts.
%C A045931 The trivariate g.f. with x marking weight (i.e., sum of the parts), t marking number of odd parts and s marking number of even parts, is 1/product((1-tx^(2j-1))(1-sx^(2j)), j=1..infinity). - _Emeric Deutsch_, Mar 30 2006
%H A045931 Alois P. Heinz, <a href="/A045931/b045931.txt">Table of n, a(n) for n = 0..3500</a> (first 1001 terms from David W. Wilson)
%F A045931 G.f.: Sum_{k>=0} x^(3*k)/Product_{i=1..k} (1-x^(2*i))^2. - _Vladeta Jovovic_, Aug 18 2007
%F A045931 a(n) = A000041(n)-A171967(n) = A130780(n)-A108950(n) = A171966(n)-A108949(n). - _Reinhard Zumkeller_, Jan 21 2010
%F A045931 a(n) = A000041(n) - A108950(n) - A108949(n) = A130780(n) + A171966(n) - A000041(n). - _Gus Wiseman_, Jan 23 2022
%F A045931 a(n) ~ Pi * exp(Pi*sqrt(2*n/3)) / (48*n^(3/2)). - _Vaclav Kotesovec_, Jun 15 2025
%e A045931 a(9) = 5 because we have [8,1], [7,2], [6,3], [5,4] and [2,2,2,1,1,1].
%e A045931 From _Gus Wiseman_, Jan 23 2022: (Start)
%e A045931 The a(0) = 1 through a(12) = 9 partitions (A = 10, empty columns indicated by dots):
%e A045931   ()  .  .  21   .  32   2211   43   3221   54       3322   65       4332
%e A045931                     41          52   4211   63       4321   74       4431
%e A045931                                 61          72       4411   83       5322
%e A045931                                             81       5221   92       5421
%e A045931                                             222111   6211   A1       6321
%e A045931                                                             322211   6411
%e A045931                                                             422111   7221
%e A045931                                                                      8211
%e A045931                                                                      22221111
%e A045931 (End)
%p A045931 g:=1/product((1-t*x^(2*j-1))*(1-s*x^(2*j)),j=1..30): gser:=simplify(series(g,x=0,56)): P[0]:=1: for n from 1 to 53 do P[n]:=subs(s=1/t,coeff(gser,x^n)) od: seq(coeff(t*P[n],t),n=0..53); # _Emeric Deutsch_, Mar 30 2006
%t A045931 p[n_] := p[n] = Select[IntegerPartitions[n], Count[#, _?OddQ] == Count[#, _?EvenQ] &]; t = Table[p[n], {n, 0, 10}] (* partitions of n with # odd parts = # even parts *)
%t A045931 TableForm[t] (* partitions, vertical format *)
%t A045931 Table[Length[p[n]], {n, 0, 30}] (* A045931 *)
%t A045931 (* _Peter J. C. Moses_, Mar 10 2014 *)
%t A045931 nmax = 100; CoefficientList[Series[Sum[x^(3*k) / Product[(1 - x^(2*j))^2, {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x] (* _Vaclav Kotesovec_, Jun 15 2025 *)
%Y A045931 The version for subsets of {1..n} is A001405.
%Y A045931 Dominated by A027187 (partitions of even length).
%Y A045931 More odd/even parts: A108950/A108949.
%Y A045931 More or same number of odd/even parts: A130780/A171966.
%Y A045931 The strict case is A239241.
%Y A045931 This is column k = 0 of the triangle A240009.
%Y A045931 Counting only distinct parts gives A241638, ranked by A325700.
%Y A045931 A half-conjugate version is A277579.
%Y A045931 These partitions are ranked by A325698.
%Y A045931 A000041 counts integer partitions, strict A000009.
%Y A045931 A047993 counts balanced partitions, ranked by A106529.
%Y A045931 A257991/A257992 count odd/even parts by Heinz number.
%Y A045931 Cf. A000070, A000700, A000712, A027193, A035363, A097613, A195017.
%K A045931 nonn
%O A045931 0,6
%A A045931 _David W. Wilson_