Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #12 Feb 24 2022 10:11:15
%S 1,0,0,0,1,0,2,0,1,0,2,0,4,0,2,1,6,1,7,0,5,2,8,1,11,1,10,4,15,3,18,3,
%T 17,7,22,6,28,6,25,11,35,11,40,11,38,19,50,18,56,18,54,30,70,28,74,30,
%U 78,45,92,40,100,46,104,63,123,60,133,69,140,88,157,86,173
%N Number of partitions of n into 7 distinct primes (counting 1 as a prime).
%H Alois P. Heinz, <a href="/A341978/b341978.txt">Table of n, a(n) for n = 42..10000</a>
%p b:= proc(n, i) option remember; series(`if`(n=0, 1,
%p `if`(i<0, 0, (p-> `if`(p>n, 0, x*b(n-p, i-1)))(
%p `if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 8)
%p end:
%p a:= n-> coeff(b(n, numtheory[pi](n)), x, 7):
%p seq(a(n), n=42..114); # _Alois P. Heinz_, Feb 24 2021
%t b[n_, i_] := b[n, i] = Series[If[n == 0, 1,
%t If[i < 0, 0, Function[p, If[p > n, 0, x*b[n - p, i - 1]]][
%t If[i == 0, 1, Prime[i]]] + b[n, i - 1]]], {x, 0, 8}];
%t a[n_] := Coefficient[b[n, PrimePi[n]], x, 7];
%t Table[a[n], {n, 42, 114}] (* _Jean-François Alcover_, Feb 24 2022, after _Alois P. Heinz_ *)
%Y Cf. A008578, A036497, A219201, A341950, A341973, A341974, A341975, A341976, A341977, A341979, A341980, A341981.
%K nonn
%O 42,7
%A _Ilya Gutkovskiy_, Feb 24 2021