login
A341408
Number of partitions of n into 3 nonprime parts.
9
1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 3, 2, 4, 5, 5, 5, 7, 6, 9, 8, 11, 10, 13, 12, 16, 14, 19, 16, 22, 19, 26, 22, 29, 27, 33, 28, 39, 33, 42, 38, 47, 43, 53, 45, 58, 52, 63, 59, 70, 61, 77, 68, 83, 76, 91, 79, 98, 88, 105, 95, 115, 102, 121, 111, 130, 119, 141, 124, 148
OFFSET
3,9
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0,
`if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+
`if`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))
end:
a:= n-> b(n$2, 3):
seq(a(n), n=3..72); # Alois P. Heinz, Feb 12 2021
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n == 0,
If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +
If[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1]]]];
a[n_] := b[n, n, 3];
a /@ Range[3, 72] (* Jean-François Alcover, Mar 28 2021, after Alois P. Heinz *)
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 12 2021
STATUS
approved