login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A344463
a(n) is the least prime p such that (p^2-2*n)/(2*n-1) and (p^2+2*n)/(2*n+1) are both prime, or 0 if such p does not exist.
1
2, 0, 239, 251, 2069, 131, 521, 0, 2243, 379, 643, 40849, 89101, 11717, 81839, 18787, 659, 0, 2887, 41081, 199261, 13931, 4231, 223439, 17443, 953, 3499, 6689, 122131, 298777, 9883, 0, 93131, 12329, 48989, 67307, 9199, 44549, 13903, 294353, 605071, 42331, 7309, 167677, 41651, 46747, 129581
OFFSET
1,1
COMMENTS
a(n) = 0 if 2*n is a square.
LINKS
EXAMPLE
a(3) = 239 because 239, (239^2-2*3)/(2*3-1) = 11423, and (239^2+2*3)/(2*3+1) = 8161 are primes, and no smaller prime works.
MAPLE
f:= proc(n) local M, p, i, j;
if issqr(2*n) then return 0 fi;
M:= sort(map(t -> rhs(op(t)), [msolve(p^2=1, 4*n^2-1)]));
for i from 0 to 10^6 do
for j in M do
p:= i*(4*n^2-1)+j;
if isprime(p) and isprime((p^2-2*n)/(2*n-1)) and isprime((p^2+2*n)/(2*n+1)) then return p fi
od od;
FAIL
end proc:
map(f, [$1..100]);
CROSSREFS
Cf. A001105.
Sequence in context: A037096 A111814 A036938 * A221750 A284451 A348183
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, May 19 2021
STATUS
approved