A341983 Number of ways to write n as an ordered sum of 4 primes (counting 1 as a prime).
1, 4, 10, 16, 23, 28, 38, 44, 55, 52, 62, 60, 84, 80, 106, 88, 123, 108, 160, 128, 184, 136, 214, 168, 261, 172, 270, 168, 304, 204, 352, 200, 382, 232, 442, 264, 470, 232, 502, 268, 557, 300, 608, 292, 672, 340, 722, 372, 789, 356, 856, 396, 900, 432, 968, 380, 1024, 432
Offset: 4
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 4..10000
Programs
-
Maple
b:= proc(n) option remember; series(`if`(n=0, 1, x*add( `if`(j=1 or isprime(j), b(n-j), 0), j=1..n)), x, 5) end: a:= n-> coeff(b(n), x, 4): seq(a(n), n=4..61); # Alois P. Heinz, Feb 24 2021
-
Mathematica
nmax = 61; CoefficientList[Series[(x + Sum[x^Prime[k], {k, 1, nmax}])^4, {x, 0, nmax}], x] // Drop[#, 4] &
Formula
G.f.: ( x + Sum_{k>=1} x^prime(k) )^4.