OFFSET
1,3
COMMENTS
If 6*n = p + q, then also 6*n = (p+2) + (q-2), with p+2 a greater and q-2 a lesser twin prime. Thus a(n) is odd if and only if n/2 is in A002822.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4)=3 because 6*4 = 24 = 5 + 19 = 11 + 13 = 17 + 7 where (5,7), (11,13) and (17,19) are twin prime pairs.
MAPLE
N:= 600: # for a(1)..a(floor(N/6)))
P:= select(isprime, {seq(i, i=3..N, 2)}):
T1:= sort(convert(P intersect map(`-`, P, 2), list)):
T2:= map(`+`, T1, 2):
V:= Vector(N):
nT:= nops(T1):
for i from 1 to nT do
for j from 1 to nT do
v:= T1[i]+T2[j];
if v > N then break fi;
V[v]:= V[v]+1;
od od:
seq(V[6*i], i=1..N/6);
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 10 2020
STATUS
approved