login
Numbers m such that 6m+1, 12m+1, 18m+1, 36m+1 and 72m+1 are all prime.
5

%I #32 Apr 22 2024 04:06:10

%S 1,121,380,506,511,3796,5875,6006,8976,9025,9186,10920,12245,12896,

%T 14476,14800,15386,22451,23471,32326,35175,38460,39536,40420,41456,

%U 43430,44415,59901,60076,61341,74676,76615,76986,82530,87390,99486,101101,107926,112315,112840,115101

%N Numbers m such that 6m+1, 12m+1, 18m+1, 36m+1 and 72m+1 are all prime.

%C A subsequence of A206024, which contains A206349 as a subsequence, see there for motivations.

%H Amiram Eldar, <a href="/A257035/b257035.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Harvey P. Dale)

%p f:=isprime: select(m->f(6*m+1) and f(12*m+1) and f(18*m+1) and f(36*m+1) and f(72*m+1),[$1..120000] ); # _Muniru A Asiru_, Jun 06 2018

%t Select[Range[120000], PrimeQ[6 # + 1] && PrimeQ[12 # + 1] && PrimeQ[18 # + 1] && PrimeQ[36 # + 1] && PrimeQ[72 # + 1] &] (* _Vincenzo Librandi_, Apr 15 2015 *)

%t Select[Range[120000],AllTrue[{6,12,18,36,72}#+1,PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Oct 23 2016 *)

%o (PARI) is(m,c=72)=!until(bittest(c\=2,0)&&9>c+=3,isprime(m*c+1)||return)

%o (Magma) [n: n in [0..2*10^5] | IsPrime(6*n+1) and IsPrime(12*n+1) and IsPrime(18*n+1) and IsPrime(36*n+1)and IsPrime(72*n+1)]; // _Vincenzo Librandi_, Apr 15 2015

%o (GAP) Filtered([1..120000],m->IsPrime(6*m+1) and IsPrime(12*m+1) and IsPrime(18*m+1) and IsPrime(36*m+1) and IsPrime(72*m+1)); # _Muniru A Asiru_, Jun 06 2018

%Y Cf. A002997, A112428, A174613, A206024, A206349.

%K nonn,easy

%O 1,2

%A _M. F. Hasler_, Apr 14 2015