login
Primes p such that 2*p + 3 is also prime.
32

%I #37 May 22 2022 16:42:44

%S 2,5,7,13,17,19,29,43,47,53,67,73,89,97,113,127,137,139,157,167,173,

%T 193,197,199,223,227,229,269,277,283,307,337,349,353,379,383,397,409,

%U 439,463,467,487,503,509,523,547,557,563,599,607,613,617,643,647,659,739,743,773

%N Primes p such that 2*p + 3 is also prime.

%H Charles R Greathouse IV, <a href="/A023204/b023204.txt">Table of n, a(n) for n = 1..10000</a>

%F A067076 INTERSECT A000040. - _R. J. Mathar_, Mar 23 2017

%p A023204 := proc (n) if isprime(n) and isprime(2*n+3) = true then n end if end proc; seq(A023204(n), n=1..1000); # _Wesley Ivan Hurt_, Jun 28 2014

%t f[n_]:=PrimeQ[2*n+3]; lst={};Do[p=Prime[n];If[f[p],AppendTo[lst,p]],{n,6!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Oct 03 2009 *)

%t Select[Prime[Range[200]],PrimeQ[2#+3]&] (* _Harvey P. Dale_, May 03 2012 *)

%o (Magma) [p: p in PrimesUpTo(1000) | IsPrime(2*p+3)]; // _Vincenzo Librandi_, Nov 20 2010

%o (PARI) is(n)=isprime(2*n+3)&&isprime(n) \\ _Charles R Greathouse IV_, Jul 02 2013

%Y Cf. A089530, A089531, A089532.

%K nonn,easy

%O 1,1

%A _David W. Wilson_