OFFSET
1,2
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 12 because there are 12 partitions of prime(4) = 7 that contain at least one prime. These partitions are [7], [5,2], [5,1,1], [4,3], [4,2,1], [3,3,1], [3,2,2], [3,2,1,1], [3,1,1,1,1], [2,2,2,1], [2,2,1,1,1], [2,1,1,1,1,1].
MATHEMATICA
nterms=20; Table[Total[Map[If[Count[#, _?PrimeQ]>0, 1, 0] &, IntegerPartitions[Prime[n]]]], {n, 1, nterms}]
PROG
(PARI) forprime(p=2, 59, my(m=0); forpart(X=p, for(k=1, #X, if(isprime(X[k]), m++; break))); print1(m, ", ")) \\ Hugo Pfoertner, Apr 30 2021
(PARI) seq(n)={my(p=primes(n), m=p[#p]); vecextract(Vec(1/eta(x+O(x*x^m)) - 1/prod(k=1, m, 1-if(!isprime(k), x^k) + O(x*x^m)), -m), p)} \\ Andrew Howroyd, Apr 30 2021
(Python)
from sympy.utilities.iterables import partitions
from sympy import sieve, prime
def A343813(n):
p = prime(n)
pset = set(sieve.primerange(2, p+1))
return sum(1 for d in partitions(p) if len(set(d)&pset) > 0) # Chai Wah Wu, May 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo Xausa, Apr 30 2021
STATUS
approved