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!)
A173970 Primes p such that 2*p-NextPrime are prime numbers. 3

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

%S 5,7,23,47,53,73,157,173,211,233,257,263,353,373,563,593,607,619,647,

%T 653,733,947,977,1069,1097,1103,1123,1187,1223,1283,1367,1433,1453,

%U 1459,1493,1499,1511,1613,1709,1747,1753,1759,1789,1889,1907,2099,2161,2287

%N Primes p such that 2*p-NextPrime are prime numbers.

%C 2*5-7=3, 2*7-11=3, 2*23-29=17,..

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

%p P:= select(isprime, [2,seq(i,i=1..10000,2)]):

%p Q:= 2*P[1..-2]-P[2..-1]:

%p P[select(t -> isprime(Q[t]),[$1..nops(Q)])]; # _Robert Israel_, Jul 03 2019

%t lst={};Do[p=Prime[n];If[PrimeQ[2*p-Prime[n+1]],AppendTo[lst,p]],{n,6!}];lst

%t Select[Prime[Range[400]],PrimeQ[2#-NextPrime[#]]&] (* _Harvey P. Dale_, May 04 2021 *)

%o (Magma) [p:p in PrimesUpTo(2500)| IsPrime(2*p-NextPrime(p))]; // _Marius A. Burtea_, Jul 03 2019

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Mar 03 2010

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 5 06:40 EDT 2024. Contains 372257 sequences. (Running on oeis4.)