OFFSET
1,1
COMMENTS
EXAMPLE
The pair (257, 401) = (16^2+1, 20^2+1) is not in the sequence because 401 - 257 = 144 = 2^4*3^2.
The pair (577, 677) = (24^2+1, 26^2+1) is in the sequence because 577 - 677 = 100 = 2^2*5^2.
The pair (33988901, 34035557) = (5830^2+1, 5834^2+1) is in the sequence because 33988901 - 34035557 = 46656 = 2^6*3^6.
MAPLE
with(numtheory):
T:=array(1..26):nn:=350000:q:=5:j:=1:
for n from 4 by 2 to nn do:
p:=n^2+1:
if type(p, prime)=true
then
x:=p-q:r:=q:q:=p:
u:=factorset(x):n0:=nops(u):ii:=0:d:=product(u[i], i=1..n0):
for k from 2 to 20 while(ii=0) do:
if d^k=x
then ii=1:T[j]:=r:T[j+1]:=q:j:=j+2:
else
fi:
od:
fi:
od:
print(T):
PROG
(PARI) lista(nn) = my(lastp=2); forprime(p=nextprime(lastp+1), nn, if (issquare(p-1), if (ispowerful(p-lastp), my(f=factor(p-lastp)[, 2]); if (vecmin(f) == vecmax(f), print1(lastp, ", ", p, ", ")); ); lastp = p; ); ); \\ Michel Marcus, Feb 03 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Feb 02 2022
STATUS
approved