OFFSET
2,1
COMMENTS
See comment in A244572.
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 2..10000
V. Shevelev, Theorems on twin primes-dual case, arXiv:0912.4006 [math.GM], 2009-2014. Sections 10,14.
MATHEMATICA
a[n_] := For[p = Prime[n], True, p = NextPrime[p], If[PrimeQ[p Prime[n] + 2], Return[p]]];
Table[a[n], {n, 2, 60}] (* Jean-François Alcover, Nov 18 2018 *)
sp[n_]:=Module[{p=n}, While[CompositeQ[p*n+2], p=NextPrime[p]]; p]; Table[ sp[k], {k, Prime[Range[2, 60]]}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 19 2020 *)
PROG
(PARI) s=[]; for(n=2, 100, p=q=prime(n); while(!isprime(p*q+2), p=nextprime(p+1)); s=concat(s, p)); s \\ Colin Barker, Jun 30 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Jun 30 2014
EXTENSIONS
More terms from Peter J. C. Moses, Jun 30 2014
STATUS
approved