A270245 Lesser of twin primes such that sum of twin prime pair is the sum of 2 nonzero squares.
3, 179, 521, 809, 1619, 1871, 2087, 2339, 3257, 3329, 4049, 4337, 4931, 5651, 5849, 6569, 6659, 6947, 7487, 8009, 8387, 8819, 8999, 10529, 10889, 11699, 12239, 14561, 15137, 16361, 16451, 16649, 17657, 17747, 19079, 19889, 19961, 20231, 20771, 20807, 21059, 22481, 22697, 23039, 23201
Offset: 1
Keywords
Examples
3 is a term because 3 + 5 = 2^2 + 2^2. 179 is a term because 179 + 181 = 6^2 + 18^2. 521 is a term because 521 + 523 = 12^2 + 30^2. 809 is a term because 809 + 811 = 18^2 + 36^2.
Programs
-
Mathematica
Select[Select[Prime@ Range@ 2700, PrimeQ[# + 2] &], Length[PowersRepresentations[2 # + 2, 2, 2] /. {0, } -> Nothing] > 0 &] (* _Michael De Vlieger, Mar 15 2016 *)
-
PARI
isA000404(n)={ for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2))} t(n,p=3) = {while( p+2 < (p=nextprime( p+1 )) || n-->0, ); p-2} for(n=1, 1e3, if(isA000404(2*t(n)+2), print1(t(n), ", ")));