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!)
A240699 Primes p such that at least one number among p+-2, p+-4, p+-6 is also a prime. 2
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The union of A167833 and this sequence is the set of all prime numbers, A000040.
LINKS
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
Sequence in context: A065091 A160656 A176997 * A065380 A211075 A038134
KEYWORD
nonn,easy
AUTHOR
Lei Zhou, Apr 10 2014
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 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)