Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Dec 11 2020 03:35:34
%S 0,1,2,3,2,3,2,4,2,3,2,4,4,3,4,0,4,2,6,5,2,4,2,5,4,4,4,6,2,6,2,4,6,5,
%T 12,3,6,2,4,8,6,8,8,2,6,3,6,10,4,13,2,6,4,4,10,4,10,4,6,3,4,6,10,5,8,
%U 1,0,6,2,12,4,6,6,2,10,3,10,6,6,7,2,8,4,6,6,0,6,6,6,9,2,6,2,5,6,4
%N a(n) is the number of ways to write 6*n = p + q with p a lesser twin prime (A001359) and q a greater twin prime (A006512).
%C 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.
%H Robert Israel, <a href="/A339625/b339625.txt">Table of n, a(n) for n = 1..10000</a>
%e 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.
%p N:= 600: # for a(1)..a(floor(N/6)))
%p P:= select(isprime, {seq(i,i=3..N,2)}):
%p T1:= sort(convert(P intersect map(`-`,P,2),list)):
%p T2:= map(`+`,T1,2):
%p V:= Vector(N):
%p nT:= nops(T1):
%p for i from 1 to nT do
%p for j from 1 to nT do
%p v:= T1[i]+T2[j];
%p if v > N then break fi;
%p V[v]:= V[v]+1;
%p od od:
%p seq(V[6*i],i=1..N/6);
%Y Cf. A001359, A006512, A002822, A339630.
%Y a(n)=0 for n in A243956.
%K nonn
%O 1,3
%A _J. M. Bergot_ and _Robert Israel_, Dec 10 2020