login
A334207
Number of ways to write 2n as the sum of two nonprime positive integers.
1
1, 0, 0, 1, 2, 2, 2, 4, 4, 4, 5, 6, 6, 7, 8, 7, 9, 11, 8, 11, 12, 11, 12, 14, 14, 14, 16, 15, 16, 19, 15, 19, 21, 17, 21, 22, 20, 22, 25, 22, 23, 27, 24, 25, 30, 26, 27, 31, 27, 31, 33, 30, 31, 34, 32, 34, 37, 34, 34, 42, 34, 37, 43, 36, 41, 43, 40, 41, 44, 43
OFFSET
1,5
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
Cf. A010051.
Bisection of A062610.
Sequence in context: A240321 A054861 A187324 * A323094 A086227 A302402
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 18 2020
STATUS
approved