A238217 The total number of 2's in all partitions of n into an even number of distinct parts.
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, 55, 63, 73, 84, 97, 110, 127, 145, 166, 188, 215, 243, 277, 313, 354, 400, 452, 508, 573, 644, 723, 811, 910, 1018, 1139, 1273, 1421, 1586, 1768, 1968, 2190, 2436
Offset: 0
Keywords
Examples
a(12) = 3 because the partitions in question are: 10+2, 6+3+2+1, 5+4+2+1.
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
Programs
-
Mathematica
Table[Length[Select[IntegerPartitions[n],EvenQ[Length[#]]&&Length[#] == Length[ Union[#]]&&MemberQ[#,2]&]],{n,0,50}] (* Harvey P. Dale, Dec 09 2014 *) nmax = 100; With[{k=2}, CoefficientList[Series[x^k/(1+x^k)/2 * Product[1 + x^j, {j, 1, nmax}] - x^k/(1-x^k)/2 * Product[1 - x^j, {j, 1, nmax}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Jul 05 2025 *)
-
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
Formula
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).
a(n) ~ exp(Pi*sqrt(n/3)) / (16 * 3^(1/4) * n^(3/4)). - Vaclav Kotesovec, Jul 05 2025
Extensions
Terms a(51) and beyond from Andrew Howroyd, May 01 2020
Comments