OFFSET
1,1
LINKS
Lei Zhou, Table of n, a(n) for n = 1..10000
EXAMPLE
Prime number 191: the closest prime number to 191 is 193 with 193-191 = 2 <= 6. So 191 is in this sequence.
Prime number 211: the closest prime number to 211 is 199 with 211-199=12 > 6. So 211 is not in this sequence.
MATHEMATICA
p = 2; Table[While[p = NextPrime[p]; ((NextPrime[p] - p) > 6) && (6 < (p - NextPrime[p, -1]))]; p, {n, 1, 58}]
PROG
(PARI) forprime(p=3, 250, if(p-precprime(p-1)<7, print1(p, ", "), if(nextprime(p+1)-p<7, print1(p, ", ")))) \\ Felix Fröhlich, Aug 16 2014; corrected by Michel Marcus, May 26 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lei Zhou, Apr 10 2014
STATUS
approved