OFFSET
1,2
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*m (k = 0,1,2,... and m = 1, 7, 23, 647, 863).
(ii) For each triple (a,b,c) = (1,8,20), (3,5,15), (6,14,4), (7,29,5), (18,38,18), (39,81,51), (42,98,14), any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x*y*(a*x^2+b*y^2+c*z^2) is a square.
For more refinements of Lagrange's four-square theorem, see arXiv:1604.06723.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.GM], 2016.
Zhi-Wei Sun, Refine Lagrange's four-square theorem, a message to Number Theory List, April 26, 2016.
EXAMPLE
a(4) = 1 since 4 = 0^2 + 0^2 + 2^2 + 0^2 with 2 > 0 and (5*0^2+7*0^2+9*2^2)*0*2 = 0^2.
a(7) = 1 since 7 = 2^2 + 1^2 + 1^2 + 1^2 with 1 > 0 and (5*2^2+7*1^2+9*1^2)*1*1 = 6^2.
a(23) = 1 since 23 = 2^2 + 1^2 + 3^2 + 3^2 with 3 > 0 and (5*2^2+7*1^2+9*3^2)*1*3 = 18^2.
a(647) = 1 since 647 = 13^2 + 1^2 + 6^2 + 21^2 with 6 > 0 and (5*13^2+7*1^2+9*6^2)*1*6 = 84^2.
a(863) = 1 since 863 = 1^2 + 23^2 + 18^2 + 3^2 with 18 > 0 and (5*1^2+7*23^2+9*18^2)*23*18 = 1656^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&SQ[y*z(5x^2+7y^2+9z^2)], r=r+1], {x, 0, Sqrt[n-1]}, {y, 0, Sqrt[n-1-x^2]}, {z, 1, Sqrt[n-x^2-y^2]}]; Print[n, " ", r]; Continue, {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 01 2016
STATUS
approved