OFFSET
0,6
COMMENTS
Conjecture: (i) a(n) = 0 if and only if n = 16^k*28 for some k = 0,1,2,....
(ii) For any positive integers a,b,c,d, there are infinitely many positive integers which cannot be written as w^2 + x^2 + y^2 + z^2 with a*w + b*x + c*y + d*z a square, where w,x,y,z are nonnegative integers.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..5000
Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.NT], 2016.
EXAMPLE
a(27) = 1 since 27 = 1^2 + 5^2 + 0^2 + 1^2 with 1 + 2*5 + 3*0 + 5*1 = 4^2.
a(31) = 1 since 31 = 1^2 + 2^2 + 5^2 + 1^2 with 1 + 2*2 + 3*5 + 5*1 = 5^2.
a(33) = 1 since 33 = 0^2 + 4^2 + 4^2 + 1^2 with 0 + 2*4 + 3*4 + 5*1 = 5^2.
a(52) = 1 since 52 = 4^2 + 6^2 + 0^2 + 0^2 with 4 + 2*6 + 3*0 + 5*0 = 4^2.
a(55) = 1 since 55 = 1^2 + 5^2 + 5^2 + 2^2 with 1 + 2*5 + 3*5 + 5*2 = 6^2.
a(56) = 1 since 56 = 0^2 + 4^2 + 6^2 + 2^2 with 0 + 2*4 + 3*6 + 5*2 = 6^2.
a(88) = 1 since 88 = 4^2 + 8^2 + 2^2 + 2^2 with 4 + 2*8 + 3*2 + 5*2 = 6^2.
a(137) = 1 since 137 = 10^2 + 6^2 + 1^2 + 0^2 with 10 + 2*6 + 3*1 + 5*0 = 5^2.
a(164) = 1 since 164 = 12^2 + 2^2 + 0^2 + 4^2 with 12 + 2*2 + 3*0 + 5*4 = 6^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&SQ[Sqrt[n-x^2-y^2-z^2]+2x+3y+5z], r=r+1], {x, 0, Sqrt[n]}, {y, 0, Sqrt[n-x^2]}, {z, 0, Sqrt[n-x^2-y^2]}]; Print[n, " ", r]; Continue, {n, 0, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Dec 14 2016
STATUS
approved