%I #22 Feb 16 2025 08:33:09
%S 2,3,5,23,41,131,191,293,443,653,719,1031,1409,1451,1973,2063,2273,
%T 2753,3023,3593,3911,4349,4391,4793,5003,5039,5081,5171,5231,5333,
%U 5501,6053,6113,7433,7541,7643,8273,8741,8969,9371,10691,10709,11321,11909,12119
%N Primes p such that 2p+1 and 2p^2+4p+1 are also prime.
%C Subsequence of A005384.
%C If p = 3*2(m-1)-1, q = 2*p+1 and r=2*p^2+4*p+1 (m>1), then p*q*2^m and r*2^m are amicable numbers (A063990), this follows immediately from Thabit ibn Kurrah theorem. - _Vincenzo Librandi_, Sep 30 2013
%H Harvey P. Dale, <a href="/A153477/b153477.txt">Table of n, a(n) for n = 1..1000</a>
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ThabitibnKurrahRule.html">Thâbit ibn Kurrah Rule</a>.
%e For prime p = 5, 2p+1 = 11 is prime and 2p^2+4p+1 = 71 is prime; for p=293, 2p+1 = 587 is prime and 2p^2+4p+1 = 172871 is prime.
%e For p=5=3*2-1, q=11, r=71, we have 5*11*4=220 and 71*4=284, which are amicable numbers. - _Vincenzo Librandi_, Sep 30 2013
%p a := proc (n) if isprime(n) = true and isprime(2*n+1) = true and isprime(2*n^2+4*n+1) = true then n else end if end proc: seq(a(n), n = 1 .. 13000); # _Emeric Deutsch_, Jan 02 2009
%t Select[Prime[Range[1500]],And@@PrimeQ[{2#+1,2#^2+4#+1}]&] (* _Harvey P. Dale_, Sep 23 2012 *)
%o (Magma) [p: p in PrimesUpTo(12200) | IsPrime(2*p+1) and IsPrime(2*p^2+4*p+1) ];
%Y Cf. A005384 (Sophie Germain primes p: 2p+1 is also prime).
%K nonn,changed
%O 1,1
%A _Vincenzo Librandi_, Dec 27 2008
%E Edited, corrected (2 added) and extended beyond a(8) by _Klaus Brockhaus_, Jan 01 2009
%E Extended by _Emeric Deutsch_, Jan 02 2009