%I #34 Sep 08 2022 08:44:47
%S 3,5,11,17,29,47,53,71,83,89,101,113,131,167,251,257,263,281,311,389,
%T 419,461,467,479,491,509,521,557,563,587,593,599,617,641,659,677,743,
%U 797,809,827,857,881,929,977,983,1019,1061,1103,1187,1217,1259,1277,1289,1319
%N Primes p such that 5*p + 4 is also prime.
%C Except for the first term, all terms are congruent to 5 (mod 6). - _John Cerkan_, Sep 07 2016
%H Vincenzo Librandi, <a href="/A023218/b023218.txt">Table of n, a(n) for n = 1..2000</a>
%p A023218:=n->`if`(isprime(n) and isprime(5*n+4), n, NULL): seq(A023218(n), n=1..2*10^3); # _Wesley Ivan Hurt_, Sep 07 2016
%t lst={};Do[If[PrimeQ[n]&&PrimeQ[5*n+4], AppendTo[lst, n]], {n, 13^3}];lst (* _Vladimir Joseph Stephan Orlovsky_, Sep 08 2008 *)
%t Select[Prime[Range[300]],PrimeQ[5#+4]&] (* _Harvey P. Dale_, Dec 31 2013 *)
%o (Magma) [n: n in [0..1000] | IsPrime(n) and IsPrime(5*n+4)]; // _Vincenzo Librandi_, Nov 20 2010
%Y Subsequence of primes of A024897.
%K nonn,easy
%O 1,1
%A _David W. Wilson_
|