OFFSET
1,1
COMMENTS
The corresponding squares are : 4, 36, 36, 1, 49, 49, 1, 196, 9, 25, 49, 900, 36, 484, 25, 1764, 49, 256, 1089, 169, 1156, 25, 0, 5476, 100, 81, 49, 529, 0, 16, ... and the values n for which this sequence equals 0 are in A215950.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
2018 is in the sequence because 2018^2 + 1 = 4072325 = 5^2*29*41*137 and (137+41) - (5+29) = 144 is a square, where {41, 137} == 1 mod 8 and {5, 29} ==5 mod 8.
MAPLE
with(numtheory):for n from 1 to 1000 do:x:=factorset(n^2+1):n1:=nops(x):s1:=0:s3:=0:for m from 1 to n1 do: if irem(x[m], 8)=1 then s1:=s1+x[m]:else if irem(x[m], 8)=5 then s3:=s3+x[m]:else fi:fi:od:x:=abs(s1-s3):y:=sqrt(x):if s1>0 and s3>0 and y=floor(y) then printf(`%d, `, n):else fi:od:
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 29 2012
EXTENSIONS
Definition clarified by Robert Israel, Sep 27 2018
STATUS
approved