login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest odd prime q such that pq+2 is prime, where p is the n-th odd prime.
6

%I #10 Jan 26 2025 16:23:33

%S 3,3,3,7,3,3,3,3,3,5,3,61,3,7,7,3,5,5,7,5,3,3,3,3,7,3,7,5,13,3,7,13,3,

%T 3,5,5,3,3,3,43,5,19,5,3,3,29,5,3,11,3,3,17,7,3,19,3,41,11,31,17,3,41,

%U 7,3,3,5,3,13,3,3,19,3,5,23,3,13,3,19,3,3,17,7,3,3,19,13,3,7,17,7,3,5,37,3

%N Smallest odd prime q such that pq+2 is prime, where p is the n-th odd prime.

%t f[n_] := Block[{p = Prime[n + 1], k = 1, q},While[q = Prime[k + 1]; ! PrimeQ[p*q + 2], k++ ];q];Table[f[n], {n, 95}] (* _Ray Chandler_, Feb 07 2007 *)

%Y Cf. A126609.

%K nonn,easy,changed

%O 1,1

%A _N. J. A. Sloane_, Feb 06 2007

%E Extended by _Ray Chandler_, Feb 07 2007