OFFSET
18,4
LINKS
FORMULA
a(n) = [x^n y^9] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019
a(n) = Sum_{q=1..floor(n/9)} Sum_{p=q..floor((n-q)/8)} Sum_{o=p..floor((n-p-q)/7)} Sum_{m=o..floor((n-o-p-q)/6)} Sum_{l=m..floor((n-m-o-p-q)/5)} Sum_{k=l..floor((n-l-m-o-p-q)/4)} Sum_{j=k..floor((n-k-l-m-o-p-q)/3)} Sum_{i=j..floor((n-j-k-l-m-o-p-q)/2)} A010051(q) * A010051(p) * A010051(o) * A010051(m) * A010051(l) * A010051(k) * A010051(j) * A010051(i) * A010051(n-i-j-k-l-m-o-p-q). - Wesley Ivan Hurt, Jul 13 2019
EXAMPLE
a(23) = 3 because there are 3 partitions of 23 into nine primes: [2,2,2,2,2,2,2,2,7], [2,2,2,2,2,2,3,3,5] and [2,2,2,2,3,3,3,3,3].
MAPLE
N:= 100: # to get a(0) to a(N)
Primes:= select(isprime, [$1..N]):
np:= nops(Primes):
for j from 0 to np do g[0, j]:= 1 od:
for n from 1 to 9 do
g[n, 0]:= 0:
for j from 1 to np do
g[n, j]:= convert(series(add(g[k, j-1]
*x^((n-k)*Primes[j]), k=0..n), x, N+1), polynom)
od
od:
seq(coeff(g[9, np], x, i), i=18..N) # Robert Israel, Jun 21 2015
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], Length[#]==9&&AllTrue[ #, PrimeQ]&]], {n, 18, 70}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 31 2016 *)
PROG
(PARI) a(n) = {nb = 0; forpart(p=n, if (#p && (#select(x->isprime(x), Vec(p)) == #p), nb+=1), , [9, 9]); nb; } \\ Michel Marcus, Jun 21 2015
(Magma) [#RestrictedPartitions(k, 9, Set(PrimesUpTo(1000))):k in [18..70]] ; // Marius A. Burtea, Jul 13 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Doug Bell, Jun 20 2015
STATUS
approved