login
Primes p such that 7*p + 4 is also prime.
3

%I #31 Sep 08 2022 08:44:47

%S 7,19,37,61,79,97,139,151,157,211,229,271,307,349,379,457,487,547,571,

%T 601,607,619,631,709,751,757,769,829,877,907,937,997,1021,1069,1117,

%U 1129,1237,1249,1291,1327,1429,1447,1471,1489,1549,1567,1579,1621,1627,1699

%N Primes p such that 7*p + 4 is also prime.

%C Subsequence of A024902. All terms are congruent to 1 mod 6 because 7(6n + 5) + 4 is divisible by 3. - _John Cerkan_, Jul 08 2016

%H John Cerkan, <a href="/A023224/b023224.txt">Table of n, a(n) for n = 1..10000</a>

%p A023224:=n->`if`(isprime(n) and isprime(7*n+4), n, NULL): seq(A023224(n), n=1..5000); # _Wesley Ivan Hurt_, Jul 08 2016

%t Select[Prime[Range[300]], PrimeQ[7# + 4] &] (* _Alonso del Arte_, Nov 21 2018 *)

%o (Magma) [n: n in [0..100000] | IsPrime(n) and IsPrime(7*n+4)] // _Vincenzo Librandi_, Nov 19 2010

%o (PARI) lista(nn) = for(p=2, nn, if(isprime(7*p+4), print1(p, ", "))); \\ _Altug Alkan_, Jul 08 2016

%Y Cf. A024902.

%K nonn

%O 1,1

%A _David W. Wilson_