OFFSET
1,5
LINKS
FORMULA
a(n) = Sum_{i=1..n} (1 - c(i)) * (1 - c(2*n - i)), where c is the prime characteristic (A010051).
EXAMPLE
a(8) = 4; 2*8 = 16 has four partitions into nonprime parts, (15,1), (12,4), (10,6) and (8,8).
MAPLE
N:= 1000: # for a(1)..a(N)
NP:= remove(isprime, [$1..2*N]):
V:= Vector(N):
for i from 1 to nops(NP) do
for j from i do
x:= NP[i]+NP[j];
if x > 2*N then break fi;
if x::even then
V[x/2]:= V[x/2]+1;
fi
od od:
convert(V, list); # Robert Israel, Apr 20 2020
MATHEMATICA
Table[Sum[(1 - PrimePi[i] + PrimePi[i - 1]) (1 - PrimePi[2 n - i] + PrimePi[2 n - i - 1]), {i, n}], {n, 100}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 18 2020
STATUS
approved