OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
EXAMPLE
For n=4, A002110(4)/2=210/2=105. 105+2*5 is not prime. 105+2*7 is not prime. 105+2*11 is prime, so a(4)=11.
MAPLE
A098170 := proc(n)
local pri, j, jmin;
pri := A002110(n)/2 ;
if n = 1 then
jmin := 1;
else
jmin := 3;
end if;
for j from jmin do
if isprime(pri+2*ithprime(j)) then
return ithprime(j) ;
end if;
end do:
end proc: # R. J. Mathar, Apr 12 2017
MATHEMATICA
Primorial[n_Integer] := Block[{k = Product[ Prime[ j], {j, n}]}, k]; f[n_] := Block[{p = Primorial[n]/2}, If[n == 1, j = 1, j = 2]; While[ !PrimeQ[p + 2Prime[j]], j++ ]; Prime[j]]; Table[ f[n], {n, 57}] (* Robert G. Wilson v, Sep 04 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Aug 30 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v, Sep 04 2004
STATUS
approved