OFFSET
0,2
COMMENTS
Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 5, 12, 20, 23, 31, 47, 71, 103, 148, 164.
The author proved in arXiv:1604.06723 that any natural number can be written as x^2 + y^2 + z^2 + w^2 with x + y + z a square, where x,y,z,w are integers.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.GM], 2016.
EXAMPLE
a(0) = 1 since 0 = 0^2 + 0^2 + 0^2 + 0^3 with 0 + 0 + 0 = 0^2 and 0 = 0 = 0.
a(5) = 1 since 5 = 2^2 + 0^2 + (-1)^2 + 0^3 with 2 + 0 + (-1) = 1^2 and 2 > 0 < |-1|.
a(12) = 1 since 12 = 3^2 + (-1)^2 + (-1)^2 + 1^3 with 3 + (-1) + (-1) = 1^2 and 3 > |-1| = |-1|.
a(20) = 1 since 20 = 3^2 + 1^2 + (-3)^2 + 1^3 with 3 + 1 + (-3) = 1^2 and 3 > 1 < |-3|.
a(23) = 1 since 23 = 3^2 + (-2)^2 + 3^2 + 1^3 with 3 + (-2) + 3 = 2^2 and 3 > |-2| < 3.
a(31) = 1 since 31 = 5^2 + 1^2 + (-2)^2 + 1^3 with 5 + 1 + (-2) = 2^2 and 5 > 1 < |-2|.
a(47) = 1 since 47 = 6^2 + 1^2 + (-3)^2 + 1^3 with 6 + 1 + (-3) = 2^2 and 6 > 1 < |-3|.
a(71) = 1 since 71 = 6^2 + 3^2 + (-5)^2 + 1^3 with 6 + 3 + (-5) = 2^2 and 6 > 3 < |-5|.
a(103) = 1 since 103 = 7^2 + 2^2 + 7^2 + 1^3 with 7 + 2 + 7 = 4^2 and 7 > 2 < 7.
a(148) = 1 since 148 = 9^2 + (-2)^2 + (-6)^2 + 3^3 with 9 + (-2) + (-6) = 1^2 and 9 > |-2| < |-6|.
a(164) = 1 since 164 = 9^2 + 1^2 + (-9)^2 + 1^3 with 9 + 1 + (-9) = 1^2 and 9 > 1 < |-9|.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[SQ[n-w^3-y^2-z^2]&&SQ[Sqrt[n-w^3-y^2-z^2]+(-1)^i*y+(-1)^j*z], r=r+1], {w, 0, n^(1/3)}, {y, 0, Sqrt[(n-w^3)/3]}, {i, 0, Min[1, y]}, {z, y, Sqrt[n-w^3-2y^2]}, {j, 0, Min[1, z]}]; Print[n, " ", r]; Continue, {n, 0, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jul 22 2016
STATUS
approved