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!)
A058620 Lesser of two consecutive primes whose difference divided by two is a prime: ( prime(next prime after n) - prime(n) )/2 is prime. 3
7, 13, 19, 23, 31, 37, 43, 47, 53, 61, 67, 73, 79, 83, 97, 103, 109, 113, 127, 131, 139, 151, 157, 163, 167, 173, 181, 193, 223, 229, 233, 241, 251, 257, 263, 271, 277, 283, 293, 307, 313, 317, 331, 337, 349, 353, 367, 373, 379, 383, 397, 409, 421, 433, 439 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Lesser of two consecutive primes whose difference is a semiprime (A001358). - Zak Seidov, Nov 19 2016
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MATHEMATICA
Do[ If[ PrimeQ[ (Prime[n + 1] - Prime[n] )/2], Print[ Prime[n] ]], {n, 1, 100} ]
p=7; Reap[Do[If[PrimeQ[((q=NextPrime[p])-p)/2], Sow[p]]; p=q, {100}]][[2, 1]] (* Zak Seidov, Nov 19 2016 *)
Select[Partition[Prime[Range[100]], 2, 1], PrimeQ[(#[[2]]-#[[1]])/2]&][[All, 1]] (* Harvey P. Dale, Jan 20 2021 *)
PROG
(PARI) isok(p) = isprime(p) && isprime((nextprime(p+1) - p)/2); \\ Michel Marcus, Nov 19 2016
(PARI) v=List(); p=3; forprime(q=5, , if(isprime((q-p)/2), listput(v, p); if(#v==10^4, return)); p=q) \\ Charles R Greathouse IV, Nov 20 2016
CROSSREFS
Cf. A001358.
Sequence in context: A049591 A176180 A209623 * A038910 A035497 A216527
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Dec 28 2000
STATUS
approved

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 25 13:24 EDT 2024. Contains 371971 sequences. (Running on oeis4.)