OFFSET
0,11
LINKS
EXAMPLE
a(10) = 6 because we have [5, 3, 2], [5, 2, 3], [3, 5, 2], [3, 2, 5], [2, 5, 3] and [2, 3, 5].
MAPLE
b:= proc(n, i, p) option remember; `if`(n=0, irem(p, 2)*p!, (s->
`if`(s>n, 0, b(n, i+1, p)+b(n-s, i+1, p+1)))(ithprime(i)))
end:
a:= n-> b(n, 1, 0):
seq(a(n), n=0..70); # Alois P. Heinz, Dec 04 2020
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[p, 2]*p!, Function[s, If[s > n, 0, b[n, i + 1, p] + b[n - s, i + 1, p + 1]]][Prime[i]]];
a[n_] := b[n, 1, 0];
Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Feb 26 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 04 2020
STATUS
approved