login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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