The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A239879 Primes p such that either x divides y, or y divides x, where x = nextprime(p) - p, and y = p - prevprime(p). 2
 3, 5, 7, 11, 13, 17, 19, 29, 31, 41, 43, 53, 59, 61, 71, 73, 97, 101, 103, 107, 109, 137, 139, 149, 151, 157, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 239, 241, 257, 263, 269, 271, 281, 283, 311, 313, 347, 349, 373, 397, 401, 419, 421, 431, 433, 457 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS x and y are the distances from p to the nearest primes above and below p. LINKS Harvey P. Dale, Table of n, a(n) for n = 1..1000 EXAMPLE The distances from p=29 to two nearest primes are 6 and 2, and, because 2 divides 6, p=29 is in the sequence. MATHEMATICA divQ[n_]:=Module[{pr=n-NextPrime[n, -1], nx=NextPrime[n]-n}, Divisible[ pr, nx]||Divisible[nx, pr]]; Select[Prime[Range[2, 100]], divQ] (* Harvey P. Dale, May 22 2014 *) PROG (Python) import sympy prpr = 2 prev = 3 for i in range(5, 1000, 2):     if sympy.isprime(i):         x = i - prev         y = prev - prpr         if x%y==0 or y%x==0: print str(prev)+', ',         prpr = prev         prev = i CROSSREFS Cf. A000040, A239584. Sequence in context: A186884 A045393 A132143 * A001097 A117243 A179679 Adjacent sequences:  A239876 A239877 A239878 * A239880 A239881 A239882 KEYWORD nonn AUTHOR Alex Ratushnyak, Mar 28 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 15 19:43 EDT 2021. Contains 342977 sequences. (Running on oeis4.)