OFFSET
1,1
COMMENTS
All values of (q - p) are multiples of 6.
m = p + q = x^2 + (x+2)^2; {m,p,q,x}: {52, 23, 29, 4}, {100, 47, 53, 6}, {340, 167, 173, 12}, {1460, 727, 733, 26}, {2452, 1223, 1229, 34}, {2740, 1367, 1373, 36}, {4420, 2207, 2213, 46}.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
52 = 23 + 29 = 4^2 + 6^2.
MAPLE
count:= 0: R:= NULL:
for m from 1 while count < 100 do
y:= 8*m^2+8*m+4;
if prevprime(y/2) + nextprime(y/2)=y then
count:= count+1;
R:= R, y;
fi
od:
R; # Robert Israel, Jan 07 2020
MATHEMATICA
With[{nn=100000}, Intersection[Total/@Partition[Prime[Range[nn]], 2, 1], Total/@ Partition[Range[2, 2nn, 2]^2, 2, 1]]] (* Harvey P. Dale, Jul 03 2021 *)
PROG
(PARI) v=vector(1300000); pp=3; forprime(p=5, #v/2, v[p+pp]++; pp=p); forstep(k=2, sqrtint(#v/2)-1, 2, v[2*(k^2+2*k+2)]++); for(k=1, #v, if(v[k]==2, print1(k, ", "))) \\ Hugo Pfoertner, Jan 07 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jan 26 2014
STATUS
approved