OFFSET
0,2
COMMENTS
Conjecture: (i) a(n) > 0 for all n = 0,1,2,.... Also, any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and x <= y <= z such that x + y - z is a cube of an integer.
(ii) Any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that P(x,y,z,w) is a cube of an integer, whenever P(x,y,z,w) is among the following polynomials: 2x-y, 4(2x-y), 4(x+y-z), 2x+y-z, 2*(2x+y-z), 4(2x+y-z), x+2y-2z, 4(x+2y-2z), x+3y-3z, 4(x+3y-3z), 2x+3y-3z, 2(2x+3y-3z), 4(2x+3y-3z), x+5y-5z, 4(x+5y-5z), 2x+4y-10z, 4x+8y-20z, 2x+y-z-w, 4(2x+y-z-w), 4x+y-2z-w, 2(4x+y-2z-w), 4(4x+y-2z-w).
The author has proved that each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x (or 4x) is a cube.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190.
EXAMPLE
a(2) = 1 since 2 = 0^2 + 0^2 + 1^2 + 1^2 with 0 = 0 < 1, 0 == 0 (mod 2), and 0 + 0 - 1 = (-1)^3.
a(13) = 1 since 13 = 2^2 + 0^2 + 3^2 + 0^2 with 2 > 0 < 3, 2 == 0 (mod 2), and 2 + 0 - 3 = (-1)^3.
a(18) = 1 since 18 = 2^2 + 2^2 + 3^2 + 1^2 with 2 = 2 < 3, 2 == 2 (mod 2), and 2 + 2 - 3 = 1^3.
a(31) = 1 since 31 = 1^2 + 1^2 + 2^2 + 5^2 with 1 = 1 < 2, 1 == 1 (mod 2), and 1 + 1 - 2 = 0^3.
a(95) = 1 since 95 = 9^2 + 1^2 + 2^2 + 3^2 with 9 > 1 < 2, 9 == 1 (mod 2), and 9 + 1 - 2 = 2^3.
a(479) = 1 since 479 = 15^2 + 7^2 + 14^2 + 3^2 with 15 > 7 < 14, 15 == 7 (mod 2), and 15 + 7 - 14 = 2^3.
a(653) = 1 since 653 = 12^2 + 8^2 + 21^2 + 2^2 with 12 > 8 < 21, 12 == 8 (mod 2), and 12 + 8 - 21 = (-1)^3.
a(1424) = 1 since 1424 = 8^2 + 0^2 + 8^2 + 36^2 with 8 > 0 < 8, 8 == 0 (mod 2), and 8 + 0 - 8 = 0^3.
a(2576) = 0 since 2576 = 24^2 + 16^2 + 40^2 + 12^2 with 24 > 16 < 40, 24 == 16 (mod 2), and 24 + 16 - 40 = 0^3.
a(2960) = 1 since 2960 = 24^2 + 8^2 + 32^2 + 36^2 with 24 > 8 < 32, 24 == 8 (mod 2), and 24 + 8 - 32 = 0^3.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
CQ[n_]:=CQ[n]=IntegerQ[CubeRoot[n]];
Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&CQ[x+y-z]&&Mod[x-y, 2]==0, r=r+1], {y, 0, Sqrt[n/3]}, {x, y, Sqrt[n-y^2]}, {z, y, Sqrt[n-x^2-y^2]}]; Print[n, " ", r]; Continue, {n, 0, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 06 2017
STATUS
approved