OFFSET
1,1
COMMENTS
EXAMPLE
a(1) = 24 because 24^2 + 1 = 577, (24 + 2)^2 + 1 = 677 and 677 - 577 = 10^2 is a square. The other values m such that p = m^2 + 1 and q = (m+2)^2 + 1 are primes with q - p square are 11024, 133224, 156024, 342224, 416024,...
a(2) = 6 because 6^2 + 1 = 37, (6 + 4)^2 + 1 = 101 and 101 - 37 = 8^2 is a square. The other values m such that p = m^2 + 1 and q = (m+4)^2 + 1 are primes with q - p square are 16, 126, 1350, 1456, 1566, 2310, 5200,...
MAPLE
for n from 1 to 50 do:
ii:=0:
for k from 2 by 2 to 10^9 while(ii=0) do:
p:=k^2+1:q:=(k+2*n)^2 +1:
if isprime(p) and isprime(q) and sqrt(q-p)=floor(sqrt(q-p))
then
ii:=1:printf(`%d %d \n`, n, k):
else
fi:
od:
od:
PROG
(PARI) a(n) = my(k=1); while (!(isprime(p=k^2+1) && isprime(q=(k+2*n)^2 + 1) && issquare(q-p)), k++); k; \\ Michel Marcus, Nov 18 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 18 2020
STATUS
approved