OFFSET
0,14
LINKS
David A. Corneth, Table of n, a(n) for n = 0..10000 (first 5001 terms from Doug Bell)
Sean A. Irvine, Java program (github)
FORMULA
a(n) = Sum_{l=1..floor(n/5)} Sum_{k=l..floor((n-l)/4)} Sum_{j=k..floor((n-k-l)/3)} Sum_{i=j..floor((n-j-k-l)/2)} c(i) * c(j) * c(k) * c(l) * c(n-i-j-k-l), where c = A010051. - Wesley Ivan Hurt, Apr 17 2019
a(n) = [x^n y^5] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019
EXAMPLE
a(17) = 3 because 17 can be written as the sum of five primes in exactly three ways: 2+2+3+3+7, 2+2+3+5+5, and 3+3+3+3+5.
MATHEMATICA
Array[Count[IntegerPartitions[#, {5}], _?(AllTrue[#, PrimeQ] &)] &, 71] (* Michael De Vlieger, Apr 21 2019 *)
PROG
(PARI) a(n) = {nb = 0; forpart(p=n, if (#p && (#select(x->isprime(x), Vec(p)) == #p), nb+=1), , [5, 5]); nb; } \\ Michel Marcus, Jun 21 2015
(Magma) [0] cat [#RestrictedPartitions(n, 5, {p:p in PrimesUpTo(n)}):n in [1..70]]; // Marius A. Burtea, May 09 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Doug Bell, Jun 20 2015
EXTENSIONS
More terms from David A. Corneth, Sep 06 2020
STATUS
approved