OFFSET
95,5
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0,
`if`(t=0, 1, 0), `if`(i<t or t<1, 0, b(n, i-1, t)+
`if`(isprime(i), 0, b(n-i, min(n-i, i-1), t-1))))
end:
a:= n-> b(n$2, 10):
seq(a(n), n=95..145); # 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 < t || t < 1, 0, b[n, i - 1, t] +
If[PrimeQ[i], 0, b[n - i, Min[n - i, i - 1], t - 1]]]];
a[n_] := b[n, n, 10];
Table[a[n], {n, 95, 145}] (* Jean-François Alcover, Feb 28 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 12 2021
STATUS
approved