login
A340960
Number of ways to write n as an ordered sum of 4 primes.
12
1, 4, 6, 8, 13, 16, 22, 24, 22, 32, 34, 40, 47, 48, 56, 68, 70, 76, 90, 84, 111, 112, 126, 120, 144, 120, 176, 140, 184, 148, 226, 168, 264, 184, 262, 196, 313, 192, 352, 208, 366, 256, 418, 240, 473, 260, 496, 324, 536, 300, 616, 308, 634, 348, 670, 348, 772, 364, 786, 412
OFFSET
8,2
LINKS
FORMULA
G.f.: (Sum_{k>=1} x^prime(k))^4.
MAPLE
b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
end:
a:= n-> b(n, 4):
seq(a(n), n=8..67); # Alois P. Heinz, Jan 31 2021
MATHEMATICA
nmax = 67; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^4, {x, 0, nmax}], x] // Drop[#, 8] &
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 31 2021
STATUS
approved