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!)
A154939 Primes p such that (p-1)*(p+1)-+p are primes. 9

%I #16 Sep 21 2023 12:49:53

%S 3,5,11,31,101,131,149,181,241,331,419,449,709,1051,1061,1171,1409,

%T 1549,1579,1699,1759,1831,2069,3229,3449,3761,3911,4159,4951,5821,

%U 6029,6481,6661,6679,6899,7079,7151,7229,7369,8101,8219,8629,8861,9091,9161,9521

%N Primes p such that (p-1)*(p+1)-+p are primes.

%C That is, primes p such that p^2+p-1 and p^2-p-1 are both primes: intersection of A053184 and A091567. - _Michel Marcus_, Jul 10 2016

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

%e 2*4=8-+3 -> primes, 4*6=24-+5 -> primes,...

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

%t Select[Prime[Range[1500]], And@@PrimeQ/@{#^2 - # - 1, #^2 + # - 1} &] (* _Vincenzo Librandi_, Jul 10 2016 *)

%t Select[Prime[Range[1500]],AllTrue[(#-1)(#+1)+{#,-#},PrimeQ]&] (* _Harvey P. Dale_, Sep 21 2023 *)

%o (Magma) [p: p in PrimesUpTo(10000) | IsPrime(p^2+p-1) and IsPrime(p^2-p-1)]; // _Vincenzo Librandi_, Jul 10 2016

%Y Cf. A053184, A038872, A141158, A091567, A098058, A038936, A089270, A140559.

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Jan 17 2009

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 May 9 16:51 EDT 2024. Contains 372354 sequences. (Running on oeis4.)