login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes p such that 2*p^2+4*p+1 is also prime.
2

%I #23 Sep 08 2022 08:45:47

%S 2,3,5,7,17,23,37,41,61,79,97,101,107,131,139,157,163,191,199,227,241,

%T 269,293,311,331,373,383,401,409,439,443,457,467,541,569,601,607,619,

%U 653,709,719,773,839,853,881,929,947,983,1031,1063,1087,1097,1109,1153,1231,1249

%N Primes p such that 2*p^2+4*p+1 is also prime.

%C If a(k) is of the form 3ยท2^(h-1)-1 and 2*a(k)+1 is prime, then 2^h*a(k)*(2*a(k)+1) and 2^h*(2*a(k)^2+4*a(k)+1) are a pair of amicable numbers. - _Vincenzo Librandi_, Jun 09 2014

%H Vincenzo Librandi, <a href="/A164042/b164042.txt">Table of n, a(n) for n = 1..1000</a>

%t lst={}; Do[p=Prime@n; a=2*p^2+4*p+1; If[PrimeQ@a,AppendTo[lst,p]],{n,7!}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Aug 12 2009 *)

%t Select[Range[2000], PrimeQ[#]&&PrimeQ[2 #^2 + 4 # + 1]&] (* _Vincenzo Librandi_, Apr 08 2013 *)

%t Select[Prime[Range[250]],PrimeQ[2#^2+4#+1]&] (* _Harvey P. Dale_, Sep 06 2022 *)

%o (Magma) [p: p in PrimesUpTo(1500) | IsPrime(2*p^2+4*p+1)]; // _Vincenzo Librandi_, Apr 08 2013

%Y Cf. A164041.

%K nonn,easy

%O 1,1

%A _Vincenzo Librandi_, Aug 08 2009

%E Extended by _R. J. Mathar_, Aug 11 2009