A341480 Number of ways to write n as an ordered sum of 3 nonprime numbers.
1, 0, 0, 3, 0, 3, 3, 3, 9, 4, 9, 12, 12, 15, 21, 19, 27, 30, 30, 39, 42, 46, 54, 60, 61, 75, 72, 91, 90, 108, 99, 129, 123, 142, 147, 168, 156, 201, 180, 217, 213, 246, 235, 279, 255, 304, 297, 336, 327, 375, 342, 412, 390, 447, 423, 492, 453, 529, 507, 573, 538, 630, 579
Offset: 3
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 3..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, 3): seq(a(n), n=3..65); # Alois P. Heinz, Feb 13 2021
-
Mathematica
nmax = 65; CoefficientList[Series[Sum[Boole[!PrimeQ[k]] x^k, {k, 1, nmax}]^3, {x, 0, nmax}], x] // Drop[#, 3] &
Formula
G.f. g(x)^3 where g(x) is the G.f. of A005171.