login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A297306 Primes p such that q = 4*p+1 and r = (2*p+1)/3 are also primes. 1

%I #48 Nov 27 2020 02:08:14

%S 7,43,79,163,673,853,919,1063,1429,1549,1663,2143,2683,3229,3499,4993,

%T 5119,5653,5779,6229,6343,7333,7459,7669,8353,8539,8719,9829,10009,

%U 10243,10303,11383,11689,12583,13399,14149,14653,14923,15649,16603,17053,17389,17749

%N Primes p such that q = 4*p+1 and r = (2*p+1)/3 are also primes.

%C This sequence was suggested by _Moshe Shmuel Newman_. It has its source in his study of finite groups.

%H Alois P. Heinz, <a href="/A297306/b297306.txt">Table of n, a(n) for n = 1..10000</a>

%e Prime p = 7 is in the sequence because q = 4*7+1 = 29 and r = (2*7+1)/3 = 5 are also primes.

%p a:= proc(n) option remember; local p; p:= `if`(n=1, 1, a(n-1));

%p do p:= nextprime(p); if irem(p, 3)=1 and

%p isprime(4*p+1) and isprime((2*p+1)/3) then break fi

%p od; p

%p end:

%p seq(a(n), n=1..50); # _Alois P. Heinz_, Jan 07 2018

%t a[n_] := a[n] = Module[{p}, p = If[n == 1, 1, a[n-1]]; While[True, p = NextPrime[p]; If[Mod[p, 3] == 1 && PrimeQ[4p+1] && PrimeQ[(2p+1)/3], Break[]]]; p];

%t Array[a, 50] (* _Jean-François Alcover_, Nov 27 2020, after _Alois P. Heinz_ *)

%o (PARI) isok(p) = isprime(p) && isprime(4*p+1) && iferr(isprime((2*p+1)/3), E, 0); \\ _Michel Marcus_, Nov 27 2020

%Y Cf. A000040.

%Y Intersection of A023212 and A104163.

%K nonn

%O 1,1

%A _David S. Newman_, Jan 04 2018

%E More terms from _Alois P. Heinz_, Jan 07 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)