A341481 Number of ways to write n as an ordered sum of 4 nonprime numbers.
1, 0, 0, 4, 0, 4, 6, 4, 16, 8, 18, 28, 25, 40, 50, 56, 76, 92, 98, 136, 147, 176, 212, 240, 272, 328, 352, 420, 471, 524, 592, 668, 747, 808, 938, 996, 1127, 1232, 1354, 1456, 1658, 1720, 1966, 2052, 2279, 2408, 2700, 2772, 3144, 3232, 3568, 3740, 4117, 4228, 4722
Offset: 4
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 4..10000
Crossrefs
Programs
-
Maple
b:= proc(n, t) option remember; `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add( `if`(isprime(j), 0, b(n-j, t-1)), j=1..n))) end: a:= n-> b(n, 4): seq(a(n), n=4..58); # Alois P. Heinz, Feb 13 2021
-
Mathematica
nmax = 58; CoefficientList[Series[Sum[Boole[!PrimeQ[k]] x^k, {k, 1, nmax}]^4, {x, 0, nmax}], x] // Drop[#, 4] &
Formula
G.f. g(x)^4, where g(x) is the G.f. of A005171.