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!)
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
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 05:43 EDT 2024. Contains 371264 sequences. (Running on oeis4.)