%I #22 Mar 23 2017 09:34:13
%S 17,37,22501,32401,57601,72901,176401,324901,1664101,1742401,5336101,
%T 6502501,7452901,11289601,11492101,18147601,21622501,34222501,
%U 34574401,40449601,45968401,81000001,85377601,92736901,110880901,118592101
%N Primes of form pq + 2 where p and q are twin primes.
%C Starting with 3rd term, 22501, all terms are of the form 900n^2+1 with n=5, 6, 8, 9, 14, 19, 43, 44, 77, 85 (A125251). - _Zak Seidov_, Dec 07 2008
%C Primes of the form (p^2 + q^2)/2, where p and q are twin primes. - _Thomas Ordowski_ and _Altug Alkan_, Mar 19 2017
%H Giovanni Resta, <a href="/A051779/b051779.txt">Table of n, a(n) for n = 1..10000</a>
%F {A037074(k) + 2} INTERSECT {A000040}. {A001359(k) * A006512(k) + 2} INTERSECT {A000040}. {A054735(k)^2 + 2*A054735(k) + 2} INTERSECT {A000040}. - _Jonathan Vos Post_, May 11 2006
%e The third term 22501 is a member of the sequence because 22501=149*151+2, 22501 is prime and {149,151} is a twin prime pair.
%p with (numtheory): for n from 1 to 2000 do if (ithprime(n+1)-ithprime(n)=2) then if (tau(ithprime(n)*ithprime(n+1)+2)=2) then print(ithprime(n),ithprime(n+1), ithprime(n)*ithprime(n+1)+2); fi; fi; od;
%t lst={};Do[p=Prime[n];If[Length[Divisors[p-2]]==4&&(Divisors[p-2][[3]]-Divisors[p-2][[2]])==2, AppendTo[lst, p]], {n, 6*10^5}];lst (* _Vladimir Joseph Stephan Orlovsky_, Aug 08 2008 *)
%t Select[(First[#]Last[#]+2)&/@Select[Partition[Prime[Range[2700]], 2,1], Last[#]-First[#]==2&],PrimeQ] (* _Harvey P. Dale_, Mar 11 2011 *)
%t Select[2 + Times @@@ Select[ Partition[ Prime@ Range@ 1350, 2, 1], First[#] + 2 == Last[#] &], PrimeQ] (* _Robert G. Wilson v_, Mar 12 2001 *)
%Y Cf. A048880, A051779, A000040, A001359, A005384, A006512, A037074, A054735.
%Y Cf. A125251. - _Zak Seidov_, Dec 07 2008
%K easy,nonn
%O 1,1
%A Joe DeMaio (jdemaio(AT)kennesaw.edu), Dec 09 1999
%E Edited by _R. J. Mathar_, Aug 08 2008