login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Difference between the sum of odd parts and the sum of even parts in all the partitions of n.
1

%I #23 Aug 29 2016 09:27:11

%S 0,1,0,5,0,11,6,25,12,50,40,96,80,173,170,320,316,545,590,930,1020,

%T 1552,1760,2537,2900,4066,4736,6450,7540,10045,11856,15482,18280,

%U 23555,27920,35461,42032,52805,62662,77955,92380,113963,135040,165295,195540,237866

%N Difference between the sum of odd parts and the sum of even parts in all the partitions of n.

%H Alois P. Heinz, <a href="/A208477/b208477.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = A066967(n) - A066966(n).

%F G.f.: (Sum_{i>0} (2*i-1)*x^(2*i-1)/(1-x^(2*i-1))-2*i*x^(2*i)/(1-x^(2*i))) / Product_{j>0} (1-x^j). - _Alois P. Heinz_, Mar 10 2012

%p b:= proc(n,i) option remember; local g, h;

%p if n=0 then [1, 0]

%p elif i<1 then [0, 0]

%p else g:= b(n, i-1);

%p h:= `if`(i>n, [0, 0], b(n-i, i));

%p [g[1]+h[1], g[2]+h[2] +h[1]*i*(2*(i mod 2)-1)]

%p fi

%p end:

%p a:= n-> b(n, n)[2]:

%p seq(a(n), n=0..60); # _Alois P. Heinz_, Mar 10 2012

%t Map[Total[Select[#, OddQ]] - Total[Select[#, EvenQ]] &[Flatten[IntegerPartitions[#]]] &, -1 + Range[30]] (* _Peter J. C. Moses_, Mar 14 2014 *)

%t max = 60; s = Sum[x^(2i) (x^(2i) - 2i (x-1) - 1)/(x + x^(4i) - (x+1) x^(2i) ), {i, 1, Floor[max/2]}]/QPochhammer[x] + O[x]^max; CoefficientList[s, x] (* _Jean-François Alcover_, Aug 29 2016, after _Alois P. Heinz_ *)

%Y Cf. A066186, A209423.

%K nonn

%O 0,4

%A _Omar E. Pol_, Mar 10 2012

%E More terms from _Alois P. Heinz_, Mar 10 2012