OFFSET
1,1
COMMENTS
If n == 2 (mod 3) then a(n) <= 3.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(7) = 5 because 5*7+6 = 41 and 5*7-6 = 29 are prime, and 5 is the least prime that works.
MAPLE
f:= proc(n) local p, pmax;
p:= 1:
if n mod 3 = 2 then pmax := 3 else pmax := infinity fi;
while p < pmax do
p:= nextprime(p);
if isprime(n*p+n-1) and isprime(n*p-n+1) then return p fi;
od:
0
end proc:
map(f, [$1..100]);
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Apr 25 2021
STATUS
approved