login
The total number of 2's in all partitions of n into an even number of distinct parts.
2

%I #10 May 01 2020 17:09:32

%S 0,0,0,1,0,1,1,1,1,1,2,2,3,3,5,5,7,8,10,11,14,16,19,22,26,30,35,41,47,

%T 55,63,73,84,97,110,127,145,166,188,215,243,277,313,354,400,452,508,

%U 573,644,723,811,910,1018,1139,1273,1421,1586,1768,1968,2190,2436

%N The total number of 2's in all partitions of n into an even number of distinct parts.

%C The g.f. for "number of k's" is (1/2)*(x^k/(1+x^k))*(Product_{n>=1} 1 + x^n) - (1/2)*(x^k/(1-x^k))*(Product_{n>=1} 1 - x^n).

%H Andrew Howroyd, <a href="/A238217/b238217.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = Sum_{j=1..round(n/4)} A067659(n-(2*j-1)*2) - Sum_{j=1..floor(n/4)} A067661(n-4*j).

%F G.f.: (1/2)*(x^2/(1+x^2))*(Product_{n>=1} 1 + x^n) - (1/2)*(x^2/(1-x^2))*(Product_{n>=1} 1 - x^n).

%e a(12) = 3 because the partitions in question are: 10+2, 6+3+2+1, 5+4+2+1.

%t Table[Length[Select[IntegerPartitions[n],EvenQ[Length[#]]&&Length[#] == Length[ Union[#]]&&MemberQ[#,2]&]],{n,0,50}] (* _Harvey P. Dale_, Dec 09 2014 *)

%o (PARI) seq(n)={my(A=O(x^(n-1))); Vec(x*(eta(x^2 + A)/(eta(x + A)*(1+x^2)) - eta(x + A)/(1-x^2))/2, -(n+1))} \\ _Andrew Howroyd_, May 01 2020

%Y Column k=2 of A238451.

%Y Cf. A067659, A067661.

%K nonn

%O 0,11

%A _Mircea Merca_, Feb 20 2014

%E Terms a(51) and beyond from _Andrew Howroyd_, May 01 2020