OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
a(5) = 3 because 3^5 - 2*5 = 233 is prime and no smaller prime works.
MAPLE
f:= proc(n) local p;
if not irreduc(X^n-2*n) then return -1 fi;
p:= 1;
while p < 10^7 do
p:= nextprime(p);
if isprime(p^n - 2*n) then return p fi;
if n mod (p-1) = 0 and 1-2*n mod p = 0 then return -1 fi;
od;
FAIL
end proc:
f(2):= 3:
map(f, [$1..100]);
CROSSREFS
KEYWORD
sign
AUTHOR
Robert Israel, Jun 25 2023
STATUS
approved