OFFSET
1,11
LINKS
FORMULA
a(n) = Sum_{i=1..floor(n/2)} c(i) * (1 - c(n-i)), where c is the prime characteristic (A010051).
EXAMPLE
a(11) = 3; 11 = 9+2 = 8+3 = 6+5, smaller parts are prime, larger nonprime.
MATHEMATICA
Table[Sum[(1 - (PrimePi[n - i] - PrimePi[n - i - 1])) (PrimePi[i] - PrimePi[i - 1]), {i, Floor[n/2]}], {n, 100}]
Table[Count[Boole[PrimeQ[#]&/@IntegerPartitions[n, {2}]], _?(#=={0, 1}&)], {n, 90}] (* Harvey P. Dale, Jan 05 2020 *)
PROG
(PARI) a(n) = sum(i=1, n\2, isprime(i)*(1-isprime(n-i))); \\ Michel Marcus, Apr 09 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 08 2018
STATUS
approved