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

%I

%S 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,

%T 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,

%U 19,7,11,3,5,7,19,7,7,5,7,19,5,13,11,3,11,3

%N a(n) is the smallest prime p that makes prime(n) + 1 - p a prime.

%C If Goldbach's conjecture is true, this sequence is defined for all n.

%e For n = 3, prime(3) = 5, and a(3) = 3 because 5 + 1 - 3 = 3 is prime;

%e For n = 4, prime(4) = 7, and a(4) = 3 because 7 + 1 - 3 = 5 is prime;

%e ...

%e for n = 25, prime(n) = 97, and a(n) = 19 because 97 + 1 - 19 = 79 is prime.

%t f[n_] := Block[{i = 2, p = Prime[n + 2]},

%t While[q = Prime[i]; ! PrimeQ[p + 1 - q], i++]; q]; Array[f, 60]

%o (PARI) a(n) = my(p=prime(n), q=2); while (!isprime(p+1-q), q = nextprime(q+1)); q; \\ _Michel Marcus_, Apr 01 2020

%Y Differs from A119912 after 23 terms.

%K nonn,easy

%O 3,1

%A _Lei Zhou_, Jan 06 2011

%E More terms from _Michel Marcus_, Apr 01 2020

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 3 17:13 EDT 2021. Contains 346439 sequences. (Running on oeis4.)