OFFSET
0,2
COMMENTS
Conjecture: (i) a(n) > 0 for all n = 0,1,2,....
(ii) Any nonnegative integer n can be written as x^2 + y^2 + z^2 + w^2 with x - y + z and z + w both squares, where x,w are integers and y,z are nonnegative integers.
The author has proved that every n = 0,1,2,... is the sum of a fourth power and three squares. Y.-C. Sun and the author have shown 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.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Yu-Chen Sun and Zhi-Wei Sun, Some refinements of Lagrange's four-square theorem, arXiv:1605.03074 [math.NT], 2016-2017.
Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190.
EXAMPLE
a(5) = 1 since 5 = 0^2 + 0^2 + (-1)^2 + 2^2 with 0 = 0^2 and 0 + 0 + (-1) + 2 = 1^2.
a(23) = 1 since 23 = 1^2 + 2^2 + 3^2 + 3^2 with 1 = 1^2 and 1 + 2 + 3 + 3 = 3^2.
a(47) = 1 since 47 = 1^2 + (-1)^2 + 3^2 + 6^2 with 1 = 1^2 and 1 + (-1) + 3 + 6 = 3^2.
a(157) = 1 since 157 = 4^2 + (-2)^2 + (-4)^2 + 11^2 with 4 = 2^2 and 4 + (-2) + (-4) + 11 = 3^2.
a(284) = 1 since 284 = 9^2 + 3^2 + 5^2 + (-13)^2 with 9 = 3^2 and 9 + 3 + 5 + (-13) = 2^2.
a(628) = 1 since 628 = 9^2 + (-5)^2 + (-9)^2 + 21^2 with 9 = 3^2 and 9 + (-5) + (-9) + 21 = 4^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
Do[r=0; Do[If[SQ[n-x^4-y^2-z^2]&&SQ[x^2+(-1)^i*y+(-1)^j*z+(-1)^k*Sqrt[n-x^4-y^2-z^2]], r=r+1], {x, 0, n^(1/4)}, {y, 0, Sqrt[(n-x^4)/3]}, {i, 0, Min[y, 1]}, {z, y, Sqrt[(n-x^4-y^2)/2]}, {j, 0, Min[z, 1]}, {k, 0, Min[Sqrt[n-x^4-y^2-z^2], 1]}]; Print[n, " ", r]; Continue, {n, 0, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 02 2017
STATUS
approved