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!)
A216075 Numbers n such that 2*prime(n) - prime(n+1) is prime. 3

%I #23 Apr 06 2018 14:21:37

%S 3,4,9,15,16,21,37,40,47,51,55,56,71,74,103,108,111,114,118,119,130,

%T 161,165,180,184,185,188,195,200,208,219,227,231,232,238,239,240,255,

%U 267,272,273,274,278,290,292,317,326,340,354,359,381,388,392,396,416

%N Numbers n such that 2*prime(n) - prime(n+1) is prime.

%C Corresponding values of 2*prime(n) - prime(n+1) are in A215808.

%H Zak Seidov, <a href="/A216075/b216075.txt">Table of n, a(n) for n = 1..1000</a>

%t f[n_]:=(2Prime[n]-Prime[n+1]); Select[Range[1000],PrimeQ[f[#]]&]

%t Position[Partition[Prime[Range[500]],2,1],_?(PrimeQ[2#[[1]]-#[[2]]]&), 1,Heads->False]//Flatten (* _Harvey P. Dale_, Apr 06 2018 *)

%o (PARI) list(lim)=my(v=List(),n,p=2); forprime(q=3,, if(n++>lim, return(Vec(v))); if(isprime(2*p-q), listput(v,n)); p=q) \\ _Charles R Greathouse IV_, May 22 2017

%Y Cf. A215808.

%K nonn

%O 1,1

%A _Zak Seidov_, Sep 06 2012

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