A339395 Number of partitions of n into an even number of nonprime parts.
1, 0, 1, 0, 1, 1, 1, 2, 2, 3, 4, 4, 6, 7, 8, 10, 13, 14, 19, 20, 26, 29, 36, 40, 51, 56, 70, 76, 96, 105, 129, 143, 172, 192, 231, 254, 308, 339, 402, 447, 529, 586, 691, 764, 896, 993, 1159, 1281, 1493, 1652, 1912, 2114, 2445, 2699, 3110, 3436, 3939, 4356, 4982, 5497, 6280
Offset: 0
Keywords
Examples
a(9) = 3 because we have [8, 1], [6, 1, 1, 1] and [4, 1, 1, 1, 1, 1].
Programs
-
Mathematica
nmax = 60; CoefficientList[Series[(1/2) (Product[(1 - x^Prime[k])/(1 - x^k), {k, 1, nmax}] + Product[(1 + x^Prime[k])/(1 + x^k), {k, 1, nmax}]), {x, 0, nmax}], x]