login
A363796
a(n) is the least prime p such that p^n + 2*n is prime, or -1 if there is no such p.
4
3, 3, 5, 3, 13, 31, 5, 3, 71, 3, 1279, -1, 641, 3, 11, -1, 3, 5, 317, 2477, 191, -1, 2473, -1, 59, 31, 5, -1, 3061, 907, 401, -1, 353, 3, 1153, 431, 113, 1949, 7, -1, 7027, 1063, 23, 2239, 1109, -1, 2887, 41, 251, 953, 2543, -1, 367, 607, 59, 1627, 43, -1, 67, -1, 5, 307, 257, -1, 1483, -1, 353
OFFSET
1,1
COMMENTS
If n = (q^2-1)/2 + k*(q^2-q) for some odd prime q and integer k, then the only possible p is q, as otherwise q | p^n + 2*n. Conjecture: these are the only cases where a(n) = -1.
LINKS
EXAMPLE
a(5) = 13 because 13^5 + 2*5 = 371303 is prime, and no smaller prime than 13 works.
MAPLE
N:= 100: # for a(1) to a(N)
V:= Vector(N):
q:=3:
do
k0:= (q^2-1)/2;
if k0 > N then break fi;
for k from k0 to N by q^2-q do
v:= q^k + 2*k; if isprime(v) then V[k]:= q; else V[k]:= -1 fi;
od;
q:= nextprime(q);
od:
for k from 1 to N do
if V[k] <> 0 then next fi;
p:= 1:
do
p:= nextprime(p);
v:= p^k + 2*k;
if isprime(v) then V[k]:= p; break fi;
od od:
convert(V, list);
CROSSREFS
Sequence in context: A376691 A094439 A122037 * A201454 A008316 A335952
KEYWORD
sign
AUTHOR
Robert Israel, Jun 22 2023
STATUS
approved