OFFSET
0,7
FORMULA
a(n) = Sum_{k=1..floor(n/4)} Sum_{j=k..floor((n-k)/3)} Sum_{i=j..floor((n-j-k)/2)} sign( c(k) + c(j) + c(i) + c(n-i-j-k) ), where c is the prime characteristic (A010051).
MAPLE
b:= proc(n, i, t) option remember; series(
`if`(n=0, t, `if`(i<1, 0, expand(x*b(n-i, min(n-i, i),
`if`(isprime(i), 1, t)))+b(n, i-1, t))), x, 5)
end:
a:= n-> coeff(b(n$2, 0), x, 4):
seq(a(n), n=0..60); # Alois P. Heinz, Oct 24 2021
MATHEMATICA
Table[Sum[Sum[Sum[Sign[(PrimePi[k] - PrimePi[k - 1]) + (PrimePi[j] - PrimePi[j - 1]) + (PrimePi[i] - PrimePi[i - 1]) + (PrimePi[n - i - j - k] - PrimePi[n - i - j - k - 1])], {i, j, Floor[(n - j - k)/2]}], {j, k, Floor[(n - k)/3]}], {k, Floor[n/4]}], {n, 0, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jan 11 2021
STATUS
approved