OFFSET
0,6
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
EXAMPLE
a(6) = 4 because there are 4 partitions of 6 that contain a prime number of primes (including repetitions). These partitions are [3,3], [3,2,1], [2,2,2], [2,2,1,1].
MATHEMATICA
nterms=50; Table[Total[Map[If[PrimeQ[Count[#, _?PrimeQ]], 1, 0] &, IntegerPartitions[n]]], {n, 0, nterms-1}]
(* Second program: *)
seq[n_] := Module[{p}, p = 1/Product[1 - If[PrimeQ[k], y*x^k, 0] + O[x]^n, {k, 2, n}]; CoefficientList[Sum[If[PrimeQ[k], Coefficient[p, y, k], 0], {k, 2, n}]/QPochhammer[x + O[x]^n]/(p /. y -> 1), x]];
seq[50] (* Jean-François Alcover, May 27 2021, after Andrew Howroyd *)
PROG
(PARI) seq(n)={my(p=1/prod(k=2, n, 1 - if(isprime(k), y*x^k) + O(x*x^n))); Vec(sum(k=2, n, if(isprime(k), polcoef(p, k, y)))/eta(x+O(x*x^n))/subst(p, y, 1), -(n+1))} \\ Andrew Howroyd, May 26 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo Xausa, May 26 2021
STATUS
approved