A341482 Number of ways to write n as an ordered sum of 5 nonprime numbers.
1, 0, 0, 5, 0, 5, 10, 5, 25, 15, 30, 55, 45, 85, 105, 126, 180, 220, 260, 360, 415, 510, 650, 745, 915, 1101, 1270, 1525, 1800, 2045, 2440, 2780, 3225, 3660, 4250, 4771, 5465, 6185, 6930, 7840, 8816, 9790, 11015, 12240, 13505, 15146, 16595, 18385, 20240, 22325, 24255
Offset: 5
Keywords
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, 5): seq(a(n), n=5..55); # Alois P. Heinz, Feb 13 2021
-
Mathematica
nmax = 55; CoefficientList[Series[Sum[Boole[!PrimeQ[k]] x^k, {k, 1, nmax}]^5, {x, 0, nmax}], x] // Drop[#, 5] &