|
|
A351494
|
|
a(n) is the least prime p such that n*(p+1)+1 is the square of a prime, or 0 if there is no such p.
|
|
1
|
|
|
2, 3, 7, 5, 23, 3, 23, 2, 31, 11, 47, 3, 479, 11, 7, 2, 263, 19, 71, 5, 7, 23, 839, 11, 887, 107, 103, 5, 1031, 3, 3119, 29, 239, 131, 23, 7, 599, 599, 71, 2, 167, 3, 17159, 11, 7, 47, 9239, 5, 191, 443, 199, 53, 839, 211, 311, 2, 23, 59, 2111, 5, 2207, 59, 79, 251, 263, 7, 2399, 149, 31, 11
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(n) is the least prime p of the form (q^2-(n+1))/n where q is a prime, or 0 if there is no such p.
If n+1 is prime, then a(n) <= n+1 as n*(n+1+1)+1 = (n+1)^2 is the square of a prime.
If n+1 = r^2 is a square, q^2-(n+1) = (q-r)*(q+r), so in order for p = (q-r)*(q+r)/n to be prime we need at least one of q-r and q+r to be a divisor of n. In particular, in this case we have q <= r+n. This can be used to show that a(n) = 0 for n = 143, 288, 323, 575, 728, 899, ....
Conjecture: all cases where a(n) = 0 arise in this way.
|
|
LINKS
|
|
|
EXAMPLE
|
a(5) = 23 because 23 is prime, 5*(23+1)+1 = 121 = 11^2, and 11 is prime, and no prime < 23 works.
|
|
MAPLE
|
f:= proc(n) local j, q, p, M, qmax;
if issqr(n+1) then qmax:= n+sqrt(n+1) else qmax:= infinity fi;
M:=sort(map(t -> rhs(op(t)), [msolve(q^2-1, n)]));
for j from 0 do
for m in M do
q:= j*n+m;
if q > qmax then return 0 fi;
if isprime(q) then
p:= (q^2-1)/n - 1;
if isprime(p) then return p fi
fi od od
end proc:
f(1):= 2:
map(f, [$1..100]);
|
|
PROG
|
(PARI) a(n) = my(p=2, r); while (!(issquare(n*(p+1)+1, &r) && isprime(r)), p=nextprime(p+1)); p; \\ Michel Marcus, May 04 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|