login
Number of ways to write n as an ordered sum of 7 primes (counting 1 as a prime).
5

%I #8 Feb 25 2021 15:23:48

%S 1,7,28,77,168,308,511,785,1155,1603,2142,2723,3430,4207,5202,6216,

%T 7497,8729,10451,12061,14350,16205,19033,21182,24934,27482,32109,

%U 34587,40139,42714,49791,52290,60718,62699,73297,75278,88571,89488,104993,104482,123760,122066

%N Number of ways to write n as an ordered sum of 7 primes (counting 1 as a prime).

%H Alois P. Heinz, <a href="/A341986/b341986.txt">Table of n, a(n) for n = 7..10000</a>

%F G.f.: ( x + Sum_{k>=1} x^prime(k) )^7.

%p b:= proc(n) option remember; series(`if`(n=0, 1, x*add(

%p `if`(j=1 or isprime(j), b(n-j), 0), j=1..n)), x, 8)

%p end:

%p a:= n-> coeff(b(n), x, 7):

%p seq(a(n), n=7..48); # _Alois P. Heinz_, Feb 25 2021

%t nmax = 48; CoefficientList[Series[(x + Sum[x^Prime[k], {k, 1, nmax}])^7, {x, 0, nmax}], x] // Drop[#, 7] &

%Y Cf. A008578, A280917, A283762, A340963, A341950, A341978, A341982, A341983, A341984, A341985, A341987, A341988, A341989.

%K nonn

%O 7,2

%A _Ilya Gutkovskiy_, Feb 24 2021