login
A363883
a(n) is the least prime p such that p^n - 2*n is prime, or -1 if there is no such p.
1
5, 3, 2, 3, 3, 13, 127, -1, 11, 3, 41, 5, 3, -1, 307, 79, 5, -1, 211, -1, 41, 991, 83, 61, 439, -1, 17, -1, 5, 199, 859, -1, 149, 5, 431, 251, 883, -1, 18353, 31, 2969, 991, 229, -1, 7, 137, 5987, -1, 1321, -1, 2711, 43, 6653, 1901, 3, -1, 587, 197, 7001, -1, 1213, -1, 367, 839, 1217, 73, 7, -1
OFFSET
1,1
LINKS
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
Cf. A363796.
Sequence in context: A249802 A249574 A090125 * A372389 A040022 A165100
KEYWORD
sign
AUTHOR
Robert Israel, Jun 25 2023
STATUS
approved