login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A152292 Primes p of the form : (p-n)/(n+1)=prime and (n+1)*p+n=prime. n=2. 5

%I

%S 17,23,59,89,239,269,293,383,419,503,953,1013,1193,1259,1823,1979,

%T 2129,2633,2789,3209,3389,4229,5099,5333,6089,6299,6803,7019,7673,

%U 7853,8123,8513,8753,8819,9059,9203,10169,10223,10589,10853,10979,11159,12689

%N Primes p of the form : (p-n)/(n+1)=prime and (n+1)*p+n=prime. n=2.

%C This is the general form : (p-n)/(n+1)=prime and (n+1)*p+n=prime; 'Safe' primes and 'Sophie Germain' primes just one part of this general form; If n=1 then we got 'Safe' primes and 'Sophie Germain' primes.

%H Robert Israel, <a href="/A152292/b152292.txt">Table of n, a(n) for n = 1..10000</a>

%p Res:= NULL: count:= 0:

%p q:= 1:

%p while count < 100 do

%p q:= nextprime(q);

%p if isprime(3*q+2) and isprime(9*q+8)

%p then Res:= Res, 3*q+2; count:= count+1

%p fi

%p od:

%p Res; # _Robert Israel_, Mar 07 2018

%t lst={};n=2;Do[p=Prime[k];If[PrimeQ[(p-n)/(n+1)]&&PrimeQ[(n+1)*p+n],AppendTo[lst,p]],{k,7!}];lst

%o (PARI) lista(nn) = forprime(p=17, nn, if(isprime(3*p+2) && isprime(p\3), print1(p", "))); \\ _Altug Alkan_, Mar 07 2018

%o (MAGMA) [NthPrime(n): n in [5..2*10^3] | IsPrime(NthPrime(n) div 3) and IsPrime(3*NthPrime(n)+2)]; // _Vincenzo Librandi_, Mar 08 2018

%Y Cf. A059455, A152293, A152294, A152295, A152388.

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Dec 02 2008

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 2 09:56 EST 2021. Contains 341746 sequences. (Running on oeis4.)