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
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Dec 28 2000
STATUS
approved