OFFSET
1,6
LINKS
EXAMPLE
a(8) = 3; the partitions of 8 into two parts are (7,1), (6,2), (5,3) and (4,4). Since the parts in (7,1), (6,2) and (4,4) are not both prime, a(8) = 3.
a(11) = 5; the partitions of 11 into two parts are (10,1), (9,2), (8,3), (7,4) and (6,5). All of these have parts that are not both prime, so a(11) = 5.
MAPLE
N:= 1000: # to get a(1)..a(N)
P:= select(isprime, [2, seq(i, i=3..N, 2)]):
A:= Vector(N, t -> floor(t/2)):
for i from 1 to nops(P) do
for j from i to nops(P) do
m:= P[i]+P[j];
if m > N then break fi;
A[m]:= A[m]-1;
od od:
convert(A, list); # Robert Israel, Dec 07 2017
MATHEMATICA
Table[Sum[1 - (PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i] - PrimePi[n - i - 1]), {i, Floor[n/2]}], {n, 80}]
Table[Total[If[AllTrue[#, PrimeQ], 0, 1]&/@IntegerPartitions[n, {2}]], {n, 70}] (* Harvey P. Dale, Jan 17 2024 *)
PROG
(PARI) a(n) = sum(i=1, floor(n/2), 1 - isprime(i)*isprime(n-i)) \\ Iain Fox, Dec 06 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Nov 24 2017
STATUS
approved