OFFSET
1,1
COMMENTS
a(n) = 0 if 2*n is a square.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, May 19 2021
STATUS
approved