OFFSET
1,5
COMMENTS
Conjecture: a(n) > 0 for all n > 0.
In contrast, the author has proved that any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z integers such that x + y + z is a square. See arXiv:1604.06723.
Yu-Chen Sun and the author proved in arXiv:1605.03074 that any nonnegative integer can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z integers such that w + x + y + z is a square. - Zhi-Wei Sun, May 10 2016
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Yu-Chen Sun and Zhi-Wei Sun, Two refinements of Lagrange's four-square theorem, arXiv:1605.03074 [math.NT], 2016.
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(1) = 1 since 1 = 0^2 + 1^2 + 0^2 + 0^2 with 0 < 1 > 0 = 0 < 1 + 0 and 0 + 1 + 0 - 0 = 1^2.
a(2) = 1 since 2 = (-1)^2 + 1^2 + 0^2 + 0^2 with 1 = 1 > 0 = 0 < 1 + 0 and -1 + 1 + 0 - 0 = 0^2.
a(3) = 1 since 3 = 0^2 + 1^2 + 1^2 + 1^2 with 0 < 1 = 1 = 1 < 1 + 1 and 0 + 1 + 1 - 1 = 1^2.
a(4) = 1 since 4 = (-1)^2 + 1^2 + 1^2 + 1^2 with 1 = 1 = 1 = 1 < 1 + 1 and -1 + 1 + 1 - 1 = 0^2.
a(6) = 1 since 6 = (-1)^2 + 2^2 + 0^2 + 1^2 with 1 < 2 > 0 < 1 < 2 + 0 and -1 + 2 + 0 - 1 = 0^2.
a(7) = 1 since 7 = (-1)^2 + 2^2 + 1^2 + 1^2 with 1 < 2 > 1 = 1 < 2 + 1 and -1 + 2 + 1 - 1 = 1^2.
a(9) = 1 since 9 = 0^2 + 2^2 + 1^2 + 2^2 with 0 < 2 > 1 < 2 < 2 + 1 and 0 + 2 + 1 - 2 = 1^2.
a(11) = 1 since 11 = (-1)^2 + 3^2 + 0^2 + 1^2 with 1 < 3 > 0 < 1 < 3 + 0 and -1 + 3 + 0 - 1 = 1^2.
a(12) = 1 since 12 = 1^2 + 3^2 + 1^2 + 1^2 with 1 < 3 > 1 = 1 < 3 + 1 and 1 + 3 + 1 - 1 = 2^2.
a(17) = 1 since 17 = 0^2 + 2^2 + 2^2 + 3^2 with 0 < 2 = 2 < 3 < 2 + 2 and 0 + 2 + 2 - 3 = 1^2.
a(19) = 1 since 19 = 0^2 + 3^2 + 1^2 + 3^2 with 0 < 3 > 1 < 3 < 3 + 1 and 0 + 3 + 1 - 3 = 1^2.
a(23) = 1 since 23 = (-1)^2 + 3^2 + 2^2 + 3^2 with 1 < 3 > 2 < 3 < 3 + 2 and -1 + 3 + 2 - 3 = 1^2.
a(29) = 1 since 29 = 0^2 + 3^2 + 2^2 + 4^2 with 0 < 3 > 2 < 4 < 3 + 2 and 0 + 3 + 2 - 4 = 1^2.
a(31) = 1 since 31 = (-2)^2 + 3^2 + 3^2 + 3^2 with 2 < 3 = 3 = 3 < 3 + 3 and -2 + 3 + 3 - 3 = 1^2.
a(37) = 1 since 37 = (-1)^2 + 4^2 + 2^2 + 4^2 with 1 < 4 > 2 < 4 < 4 + 2 and -1 + 4 + 2 - 4 = 1^2.
a(92) = 1 since 92 = 3^2 + 5^2 + 3^2 + 7^2 with 3 < 5 > 3 < 7 < 5 + 3 and 3 + 5 + 3 - 7 = 2^2.
a(284) = 1 since 284 = 3^2 + 9^2 + 5^2 + 13^2 with 3 < 9 > 5 < 13 < 9 + 5 and 3 + 9 + 5 - 13 = 2^2.
a(572) = 1 since 572 = 3^2 + 11^2 + 9^2 + 19^2 with 3 < 11 > 9 < 19 < 11 + 9 and 3 + 11 + 9 - 19 = 2^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[Sqrt[n-x^2-y^2-z^2]<=x&&SQ[n-x^2-y^2-z^2]&&SQ[x+y-z+(-1)^k*Sqrt[n-x^2-y^2-z^2]], r=r+1], {y, 0, Sqrt[n/3]}, {x, y, Sqrt[n-y^2]}, {z, y, Min[x+y-1, Sqrt[n-x^2-y^2]]}, {k, 0, Min[1, Sqrt[n-x^2-y^2-z^2]]}]; Print[n, " ", r]; Continue, {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 03 2016
EXTENSIONS
Rick L. Shepherd, May 27 2016: I checked all the statements in each example.
STATUS
approved