OFFSET
1,2
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 9, 11, 15, 23, 33, 71, 129, 167, 187, 473, 4^k*m (k = 0,1,2,... and m = 1, 22, 38, 278). Also, any positive integer can be written as x^2 + y^2 + z^2 + w^2 with 9*(x+2*y)^2 + 16*z^2 + 24*w^2 a square, where x is a positive integer and y,z,w are nonnegative integers.
(ii) Any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and (a*x-b*y)^2 + c*z^2 + d*w^2 a square, provided that (a,b,c,d) is among the quadruples (4,8,1,8), (12,24,1,24), (2,4,5,40), (3,6,7,9), (3,9,7,9), (3,6,7,63), (1,2,8,16), (1,2,8,40), (3,6,8,40), (2,6,9,12), (3,5,9,15), (4,8,9,16), (12,24,9,16), (3,6,15,25), (3,6,16,24), (3,12,16,24), (6,9,16,24), (9,12,16,24), (4,8,16,41), (8,12,16,41), (3,6,16,48), (6,9,16,48), (2,3,16,56), (3,6,28,63), (2,4,36,45), (6,12,40,45), (7,14,56,64) and (2,6,57,60).
(iii) Let a and be positive integers with a <= b and gcd(a,b) squarefree. Then any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and (a*x+b*y)*z a square, if and only if (a,b) is among the ordered pairs (1,1), (1,2), (1,3), (2,5), (3,3), (3,6), (3,15), (5,6), (5,11), (5,13), (6,15), (8,46) and (9,23).
(iv) Let a and b be positive integers with a <= b and gcd(a,b) squarefree. Then, any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and (a*x^2+b*y^2)*z a square, if and only if (a,b) is among the ordered pairs (3,13), (5,11), (15,57), (15,165) and (138,150).
There are many ordered pairs (a,b) of integers with gcd(a,b) squarefree such that any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers and a*x^2 + b*y^2 a square. For example, we have shown that (1,-1), (2,-2), (3,-3) and (1,2) are indeed such ordered pairs.
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(9) = 1 since 9 = 3^2 + 0^2 + 0^2 + 0^2 with (3+2*0)^2 + 8*0^2 + 40*02 = 3^2.
a(11) = 1 since 11 = 1^2 + 1^2 + 3^2 + 0^2 with (1+2*1)^2 + 8*3^2 + 40*0^2 = 9^2.
a(15) = 1 since 15 = 1^2 + 3^2 + 2^2 + 1^2 with (1+2*3)^2 + 8*2^2 + 40*1^2 = 11^2.
a(22) = 1 since 22 = 3^2 + 2^2 + 3^2 + 0^2 with (3+2*2)^2 + 8*3^2 + 40*0^2 = 11^2.
a(23) = 1 since 23 = 1^2 + 3^2 + 2^2 + 3^2 with (1+2*3)^2 + 8*2^2 + 40*3^2 = 21^2.
a(33) = 1 since 33 = 4^2 + 1^2 + 0^2 + 4^2 with (4+2*1)^2 + 8*0^2 + 40*4^2 = 26^2.
a(38) = 1 since 38 = 5^2 + 2^2 + 0^2 + 3^2 with (5+2*2)^2 + 8*0^2 + 40*3^2 = 21^2.
a(71) = 1 since 71 = 1^2 + 6^2 + 5^2 + 3^2 since (1+2*6)^2 + 8*5^2 + 40*3^2 = 27^2.
a(129) = 1 since 129 = 5^2 + 6^2 + 8^2 + 2^2 with (5+2*6)^2 + 8*8^2 + 40*2^2 = 31^2.
a(167) = 1 since 167 = 11^2 + 1^2 + 3^2 + 6^2 with (11+2*1)^2 + 8*3^2 + 40*6^2 = 41^2.
a(187) = 1 since 187 = 3^2 + 5^2 + 12^2 + 3^2 with (3+2*5)^2 + 8*12^2 + 40*3^2 = 41^2.
a(278) = 1 since 278 = 3^2 + 0^2 + 10^2 + 13^2 with (3+2*0)^2 + 8*10^2 + 40*13^2 = 87^2.
a(473) = 1 since 473 = 7^2 + 10^2 + 0^2 + 18^2 with (7+2*10)^2 + 8*0^2 + 40*18^2 = 117^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&SQ[(x+2y)^2+8z^2+40(n-x^2-y^2-z^2)], r=r+1], {x, 1, Sqrt[n]}, {y, 0, Sqrt[n-x^2]}, {z, 0, Sqrt[n-x^2-y^2]}]; Print[n, " ", r]; Continue, {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Apr 14 2016
STATUS
approved