%I #11 Jan 17 2015 19:21:58
%S 2,5,29,719,1229,1409,1559,2039,2399,2699,2939,3449,3779,6269,6899,
%T 7079,8069,9689,12959,13619,14009,14249,14879,19559,20369,20759,21089,
%U 22079,22469,23459,26879,28559,30269,31799,32009,32789,33179,33569,38639,39989,40949,41399,41969,42359,45569,46349,47279,49499,49919,53309,54959,55469
%N Primes p such that 2*p+1 and ((2*p+1)^2 + 1)/2 = p^2 + (p+1)^2 are primes.
%C It is easy to prove that all the terms except the first two must satisfy a(n) mod 10 = 9.
%e a(3) = 29 = p and 2*p + 1 = 59 and (59^2 + 1)/2 = 29^2 + 30^2 = 1741 are prime.
%t Flatten[Append[{2, 5}, Select[Sort[Range[29, 30000000, 30], Range[49, 30000000, 30]], PrimeQ[ # ]&&PrimeQ[2 # + 1] && PrimeQ[1 + 2 # + 2 #^2] &]]] (Zak Seidov)
%t f1[n_]:=(n+1)^2-n^2;f2[n_]:=(n+1)^2+n^2; Select[Prime[Range[8! ]],PrimeQ[f1[ # ]]&&PrimeQ[f2[ # ]]&] (* _Vladimir Joseph Stephan Orlovsky_, Feb 25 2010 *)
%Y Cf. A082612.
%K nonn
%O 1,1
%A _Robin Garcia_, Sep 29 2004
%E More terms from _Zak Seidov_, Feb 16 2005