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!)
 A178984 a(n) is the smallest prime p that makes prime(n) + 1 - p a prime. 0
 3, 3, 5, 3, 5, 3, 5, 7, 3, 7, 5, 3, 5, 7, 7, 3, 7, 5, 3, 7, 5, 7, 19, 5, 3, 5, 3, 5, 19, 5, 7, 3, 11, 3, 7, 7, 5, 7, 7, 3, 11, 3, 5, 3, 13, 13, 5, 3, 5, 7, 3, 11, 7, 7, 7, 3, 7, 5, 3, 11, 31, 5, 3, 5, 19, 7, 11, 3, 5, 7, 19, 7, 7, 5, 7, 19, 5, 13, 11, 3, 11, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 3,1 COMMENTS If Goldbach's conjecture is true, this sequence is defined for all n. LINKS EXAMPLE For n = 3, prime(3) = 5, and a(3) = 3 because 5 + 1 - 3 = 3 is prime; For n = 4, prime(4) = 7, and a(4) = 3 because 7 + 1 - 3 = 5 is prime; ... for n = 25, prime(n) = 97, and a(n) = 19 because 97 + 1 - 19 = 79 is prime. MATHEMATICA f[n_] := Block[{i = 2, p = Prime[n + 2]},   While[q = Prime[i]; ! PrimeQ[p + 1 - q], i++]; q]; Array[f, 60] PROG (PARI) a(n) = my(p=prime(n), q=2); while (!isprime(p+1-q), q = nextprime(q+1)); q; \\ Michel Marcus, Apr 01 2020 CROSSREFS Differs from A119912 after 23 terms. Sequence in context: A216199 A073081 A094928 * A065507 A182731 A267518 Adjacent sequences:  A178981 A178982 A178983 * A178985 A178986 A178987 KEYWORD nonn,easy AUTHOR Lei Zhou, Jan 06 2011 EXTENSIONS More terms from Michel Marcus, Apr 01 2020 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 August 11 08:50 EDT 2020. Contains 336422 sequences. (Running on oeis4.)