OFFSET
0,7
COMMENTS
Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 7, 9, 14, 19, 22, 26, 34, 41, 4^k*m (k = 0,1,... and m = 1, 2, 3, 5, 10, 11, 13, 15).
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..1000
Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190.
Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017-2018.
EXAMPLE
a(9) = 1 since 9^2 = 9^2 + 0^2 + 0^2 + 0^2 with 9 + 2*0 = 3^2 and 0 + 2*0 = 3*0^2.
a(13) = 1 since 13^2 = 4^2 + 0^2 + 3^2 + 12^2 with 4 + 2*0 = 2^2 and 3 + 2*12 = 3*3^2.
a(14) = 1 since 14^2 = 4^2 + 6^2 + 12^2 + 0^2 with 4 + 2*6 = 4^2 and 12 + 2*0 = 3*2^2.
a(15) = 1 since 15^2 = 9^2 + 0^2 + 12^2 + 0^2 with 9 + 2*0 = 3^2 and 12 + 2*0 = 3*2^2.
a(41) = 1 since 41 = 38^2 + 13^2 + 8^2 + 2^2 with 38 + 2*13 = 8^2 and 8 + 2*2 = 3*2^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
tab={}; Do[r=0; Do[If[SQ[x+2y]&&SQ[(n^2-x^2-y^2-z^2)/4]&&SQ[(z+2*Sqrt[n^2-x^2-y^2-z^2])/3], r=r+1], {x, 0, n}, {y, 0, Sqrt[n^2-x^2]}, {z, 0, Sqrt[n^2-x^2-y^2]}]; tab=Append[tab, r], {n, 0, 80}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 04 2018
STATUS
approved