%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+1q), 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
