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 #14 Sep 21 2015 19:36:42
%S 1,0,1,0,0,0,2,0,2,0,2,1,4,0,4,1,4,2,6,1,6,2,6,4,8,2,10,5,9,6,11,5,13,
%T 6,14,10,16,9,18,11,19,15,21,14,22,16,25,22,26,20,29,25,31,29,32,29,
%U 35,34,39,39,38,39,43,45,48,50,46,53,53,57,57,66,55
%N Number of partitions of n into 5 distinct primes.
%H Alois P. Heinz, <a href="/A219199/b219199.txt">Table of n, a(n) for n = 28..10000</a>
%F G.f.: Sum_{0<i_1<i_2<...<i_5} x^(Sum_{j=1..5} prime(i_j)).
%F a(n) = [x^n*y^5] Product_{i>=1} (1+x^prime(i)*y).
%p b:= proc(n, i) option remember; `if`(n=0, [1,0$5], `if`(i<1, [0$6],
%p zip((x, y)->x+y, b(n, i-1), [0, `if`(ithprime(i)>n, [0$5],
%p b(n-ithprime(i), i-1)[1..5])[]], 0)))
%p end:
%p a:= n-> b(n, numtheory[pi](n))[6]:
%p seq(a(n), n=28..100);
%t k = 5; b[n_, i_] := b[n, i] = If[n == 0, Join[{1}, Array[0&, k]], If[i<1, Array[0&, k+1], Plus @@ PadRight[{b[n, i-1], Join[{0}, If[Prime[i]>n, Array[0&, k], Take[b[n-Prime[i], i-1], k]]]}]]]; a[n_] := b[n, PrimePi[n]][[k+1]]; Table[a[n], {n, 28, 100}] (* _Jean-François Alcover_, Jan 30 2014, after _Alois P. Heinz_ *)
%Y Column k=5 of A219180.
%K nonn
%O 28,7
%A _Alois P. Heinz_, Nov 14 2012