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”).
%I #17 Nov 14 2021 16:09:30
%S 0,0,1,3,20,42,151,265,753,3006,4594,15117,31576,45002,89125,235501,
%T 589613,792426,1871442,3251293,4261819,9403682,15690192,33111688,
%U 86520382,137957345,173655404,273492399,342231447,532915031,2380864800,3601147053,6628703864
%N Number of partitions of prime(n) containing a prime number of distinct primes and an arbitrary number of nonprimes.
%F a(n) = A344715(A000040(n)).
%e a(4) = 3 because there are 3 partitions of prime(4)=7 that contain a prime number of primes (not counting repetitions). These partitions are [5,2] (containing 2 primes), [3,2,2] (containing 2 unique primes) and [3,2,1,1] (containing 2 primes).
%p b:= proc(n, i) option remember; expand(
%p `if`(n=0 or i=1, 1, b(n, i-1)+`if`(isprime(i), x, 1)
%p *add(b(n-i*j, i-1), j=1..n/i)))
%p end:
%p a:= n-> (p-> add(`if`(isprime(i), coeff(p, x, i), 0),
%p i=2..degree(p)))(b(ithprime(n)$2)):
%p seq(a(n), n=1..33); # _Alois P. Heinz_, Nov 14 2021
%t nterms=22;Table[Total[Map[If[PrimeQ[Count[#, _?PrimeQ]],1,0] &,Map[DeleteDuplicates[#]&,IntegerPartitions[Prime[n]],{1}]]],{n,1,nterms}]
%Y Cf. A000040, A058698, A085755, A235945, A343753, A344677, A344715.
%K nonn
%O 1,4
%A _Paolo Xausa_, Jun 01 2021
%E a(23)-a(33) from _Alois P. Heinz_, Jun 02 2021