login
Number of ways to write n as an ordered sum of 7 primes.
11

%I #8 Jan 31 2021 22:22:07

%S 1,7,21,42,77,133,210,316,434,574,770,980,1239,1547,1876,2331,2828,

%T 3367,4032,4746,5565,6574,7602,8757,10136,11480,13132,14882,16646,

%U 18662,20951,23268,26082,28861,31787,35218,38745,42532,46403,50883,54810,60613,65016,71302,76069

%N Number of ways to write n as an ordered sum of 7 primes.

%H Alois P. Heinz, <a href="/A340963/b340963.txt">Table of n, a(n) for n = 14..10000</a>

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

%p b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;

%p if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else

%p while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi

%p end:

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

%p seq(a(n), n=14..58); # _Alois P. Heinz_, Jan 31 2021

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

%Y Column k=7 of A121303.

%Y Cf. A000040, A010051, A073610, A098238, A259197, A340960, A340961, A340962, A340964, A340965, A340966.

%K nonn

%O 14,2

%A _Ilya Gutkovskiy_, Jan 31 2021