OFFSET
0,1
COMMENTS
a(n) > n. - Iain Fox, Nov 13 2017
LINKS
Iain Fox, Table of n, a(n) for n = 0..20000
MATHEMATICA
Table[j=0; found=False; While[!found, j++; found=PrimeQ[2Prime[j]-2n+1] && 2Prime[j]-2n+1>0]; Prime[j], {n, 67}]
(* Second program: *)
Table[SelectFirst[Prime@ Range[n^2], And[# > 0, PrimeQ@ #] &[2 # - 2 n + 1] &], {n, 67}] (* Michael De Vlieger, Aug 14 2017 *)
PROG
(PARI) a(n) = {my(p=2); while(!isprime(2*p-2*n+1), p = nextprime(p+1)); p; } \\ Michel Marcus, Aug 12 2017
(PARI) a(n) = forprime(p=n+1, , if(isprime(2*p - 2*n + 1), return(p))) \\ Iain Fox, Nov 13 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
XU Pingya, Aug 11 2017
EXTENSIONS
a(0) prepended by Iain Fox, Dec 14 2017
STATUS
approved