OFFSET
1,2
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*3^m, 4^k*3^m*43, 4^k*9^m*q (k,m = 0, 1, 2, ... and q = 7, 15, 79, 95, 141, 159, 183).
(ii) Any positive integer n can be written as w^2 + x^2 + y^2 + z^2 with w*x + x*y + 2*y*z + 3*z*x (or w*x + 3*x*y + 8*y*z + 5*z*x) twice a square, where w is a positive integer and x,y,z are nonnegative integers.
(iii) For each k = 1, 2, 8, any positive integer can be written as w^2 + x^2 + y^2 + z^2 with w^2 + k*(x*y+y*z) a square, where w is a positive integer and x,y,z are nonnegative integers.
(iv) For each ordered pair (b,c) = (16,4), (24,4), (32,16), any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x^2 + b*y^2 + c*x*z + c*y*z + c*z*w is a square.
We also guess that for each triple (b,c,d) = (1,3,4), (1,6,8), (1,7,24), (1,8,15), (1,10,24), (1,12,35), (1,14,48), (1,20,48), (2,1,2), (2,4,2), (2,4,7), (2,6,7), (2,8,4), (2,8,14), (2,8,31), (2,10,23), (2,12,14), (2,12,34), (2,14,47), (3,1,1), (3,1,4), (3,1,16), (3,2,14), (3,2,17), (3,2,38), (3,3,3), (3,3,13), (3,4,1), (3,4,4), (3,5,11), (3,6,3), (3,6,6), (3,6,26), (3,8,2), (3,8,13), (3,8,22), (3,9,39), (3,12,12), (3,12,33), (3,15,1), any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers and x^2 + b*y^2 + c*x*z + d*y*z a square.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723, 2016.
EXAMPLE
a(3) = 1 since 3 = 1^2 + 0^2 + 1^2 + 1^2 with 1^2 + 4*0*1 + 8*1*1 + 32*1*0 = 3^2.
a(4) = 1 since 4 = 2^2 + 0^2 + 0^2 + 0^2 with 2^2 + 4*2*0 + 8*0*0 + 32*0*0 = 2^2.
a(7) = 1 since 7 = 1^2 + 2^2 + 1^2 + 1^2 with 1^2 + 4*2*1 + 8*1*1 + 32*1*2 = 9^2.
a(15) = 1 since 15 = 1^2 + 2^2 + 1^2 + 3^2 with 1^2 + 4*2*1 + 8*1*3 + 32*3*2 = 15^2.
a(43) = 1 since 43 = 3^2 + 3^2 + 4^2 + 3^2 with 3^2 + 4*3*4 + 8*4*3 + 32*3*3 = 21^2.
a(79) = 1 since 79 = 5^2 + 3^2 + 6^2 + 3^2 with 5^2 + 4*3*6 + 8*6*3 + 32*3*3 = 23^2.
a(95) = 1 since 95 = 5^2 + 6^2 + 5^2 + 3^2 with 5^2 + 4*6*5 + 8*5*3 + 32*3*6 = 29^2.
a(129) = 1 since 129 = 5^2 + 6^2 + 8^2 + 2^2 with 5^2 + 4*6*8 + 8*8*2 + 32*2*6 = 27^2.
a(141) = 1 since 141 = 8^2 + 5^2 + 4^2 + 6^2 with 8^2 + 4*5*4 + 8*4*6 + 32*6*5 = 36^2.
a(159) = 1 since 159 = 11^2 + 1^2 + 6^2 + 1^2 with 11^2 + 4*1*6 + 8*6*1 + 32*1*1 = 15^2.
a(183) = 1 since 183 = 1^2 + 9^2 + 10^2 + 1^2 with 1^2 + 4*9*10 + 8*10*1 + 32*1*9 = 27^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&SQ[4x*y+8*y*z+32*z*x+(n-x^2-y^2-z^2)], r=r+1], {x, 0, Sqrt[n-1]}, {y, 0, Sqrt[n-1-x^2]}, {z, 0, Sqrt[n-1-x^2-y^2]}]; Print[n, " ", r]; Continue, {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Apr 12 2016
STATUS
approved