login
Primes p such that (p+18), (p+36) and (p+72) are also prime.
1

%I #9 Sep 08 2022 08:45:51

%S 11,431,751,911,1051,2521,2731,3511,3761,4951,5261,7211,7681,9221,

%T 9461,9661,13451,13841,14851,15241,15731,15901,18181,19471,19681,

%U 20071,21121,23531,25621,25981,26321,28051,28771,31991,32341,33791,34631,35081

%N Primes p such that (p+18), (p+36) and (p+72) are also prime.

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

%e For p=11, 11+18=29, 11+36=47, 11+72=83; p=431, 431+18=449, 431+36=467, 431+72=503.

%t Select[Prime[Range[5000]], PrimeQ[# + 18] && PrimeQ[# + 36] && PrimeQ[# + 72]&] (* _Vincenzo Librandi_, Apr 10 2013 *)

%t Select[Prime[Range[4000]],AllTrue[#+{18,36,72},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Aug 08 2016 *)

%o (Magma) [ p: p in PrimesUpTo(100000) | IsPrime(p) and IsPrime(p+18) and IsPrime(p+36) and IsPrime(p+72)]

%K nonn,easy

%O 1,1

%A _Vincenzo Librandi_, Mar 08 2010