OFFSET
1,1
COMMENTS
It is known that the sum of squares of two odd numbers cannot be a square number, and when the sum of square of two numbers is the square of an odd number, the even one among the two numbers has to be multiple of 4. Thus the Mathematica program will not miss any entries.
a(n) == 1 (mod 4).
Numbers 4x^2 + y^2 where x, y are coprime numbers such that y is odd and x, y, 2x+y, 2x-y are squarefree. - Yifan Xie, Jan 09 2025, corrected by Robert Israel, Feb 03 2025
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
5 is a term since 5^2 = 3^2 + (4*1)^2 and 3*1 is squarefree.
149 is a term since 149^2 = 51^2 + (4*35)^2 and 51*35 = 3*5*7*17 is squarefree.
MAPLE
N:= 1000: # for terms <= N
Res:= {}:
for x from 1 while 4*x^2 < N do
if not numtheory:-issqrfree(x) then next fi;
for y from 1 by 2 while 4*x^2 + y^2 <= N do
if igcd(x, y) = 1 and andmap(numtheory:-issqrfree, [y, 2*x+y, 2*x-y]) then Res:= Res union {4*x^2 + y^2} fi
od od:
sort(convert(Res, list)); # Robert Israel, Feb 03 2025
MATHEMATICA
a = {}; Do[m = n^2; b = n; While[b = b - 2; b > 1, k = m - b^2; If[c = Sqrt[k]/4; IntegerQ[c] && SquareFreeQ[b*c], AppendTo[a, n]]], {n, 5, 800, 2}]; a
CROSSREFS
KEYWORD
nonn
AUTHOR
Lei Zhou, Jan 07 2025
EXTENSIONS
Edited by Robert Israel, Feb 03 2025
STATUS
approved