OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) local k;
k:= 2;
while k < 2*n do
k:= nextprime(k);
if isprime(2*n+k) and isprime(2*n-k) then return k fi
od;
NULL
end proc:
map(f, [$1..400]); # Robert Israel, Oct 09 2017
MATHEMATICA
f[n_] := {AnyTrue[Prime[Range[PrimePi[2n-2]]], (r = #; PrimeQ[2n+r] && PrimeQ[2n-r])&], r}; Select[f /@ Range[200], #[[1]] =!= False &][[All, 2]] (* Jean-François Alcover, Feb 14 2018 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Aug 10 2001
STATUS
approved