OFFSET
4,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 4..1000
EXAMPLE
a(20) = 12 because there are 12 partitions of 20 into a prime number of prime parts: 2+3+3+3+3+3+3 = 2+2+2+3+3+3+5 = 2+2+2+2+2+5+5 = 2+2+2+2+2+3+7 = 2+3+5+5+5 = 2+3+3+5+7 = 2+2+2+7+7 = 2+2+2+3+11 = 2+7+11 = 2+5+13 = 7+13 = 3+17.
MAPLE
b:= proc(n, i, t) if n<0 then 0 elif n=0 then `if`(isprime(t), 1, 0) elif i=1 then `if`(irem(n, 2)=0 and isprime(t +n/2), 1, 0) else b(n, i, t):= b(n -ithprime(i), i, t+1) +b(n, i-1, t) fi end: a:= proc(n) local i; for i while ithprime(i)<n do od; b(n, i, 0) end: seq(a(n), n=4..70); # Alois P. Heinz, Apr 30 2009
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], PrimeQ[Length[#]]&&AllTrue[ #, PrimeQ]&]], {n, 4, 70}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 18 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladeta Jovovic, Jul 21 2003
STATUS
approved