OFFSET
0,2
COMMENTS
Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 3, 11, 47, 2^{4k+3}*m (k = 0,1,2,... and m = 1, 3, 7, 15, 79).
(ii) 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 w,x,y,z nonnegative integers and a*x-b*y a square, if and only if (a,b) is among the ordered pairs (1,1), (2,1), (2,2), (4,3), (6,2). Verified for all nonnegative integers up to 10^11. - Mauro Fiorentini, Jun 14 2024
(iii) Let a and b be positive integers with 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 a square, if and only if {a,b} is among {1,2}, {1,3} and {1,24}. Verified for all nonnegative integers up to 10^11. - Mauro Fiorentini, Jun 14 2024
(iv) Let a,b,c be positive integers with a <= b and gcd(a,b,c) squarefree. Then, any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x+b*y-c*z a square, if and only if (a,b,c) is among the triples (1,1,1), (1,1,2), (1,2,1), (1,2,2), (1,2,3), (1,3,1), (1,3,3), (1,4,4), (1,5,1), (1,6,6), (1,8,6), (1,12,4), (1,16,1), (1,17,1), (1,18,1), (2,2,2), (2,2,4), (2,3,2), (2,3,3), (2,4,1), (2,4,2), (2,6,1), (2,6,2), (2,6,6), (2,7,4), (2,7,7), (2,8,2), (2,9,2), (2,32,2), (3,3,3), (3,4,2), (3,4,3), (3,8,3), (4,5,4), (4,8,3), (4,9,4), (4,14,14), (5,8,5), (6,8,6), (6,10,8), (7,9,7), (7,18,7), (7,18,12), (8,9,8), (8,14,14), (8,18,8), (14,32,14), (16,18,16), (30,32,30), (31,32,31), (48,49,48), (48,121,48). Verified for all nonnegative integers up to 10^11. - Mauro Fiorentini, Jun 14 2024
(v) Let a,b,c be positive integers with b <= c and gcd(a,b,c) squarefree. Then, any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x-b*y-c*z a square, if and only if (a,b,c) is among the triples (1,1,1), (2,1,1), (2,1,2), (3,1,2) and (4,1,2).
(vi) Let a,b,c,d be positive integers with a <= b, c <= d and gcd(a,b,c,d) squarefree. Then, any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x+b*y-(c*z+d*w) a square, if and only if (a,b,c,d) is among the quadruples (1,2,1,1), (1,2,1,2), (1,3,1,2), (1,4,1,3), (2,4,1,2), (2,4,2,4), (8,16,7,8), (9,11,2,9) and (9,16,2,7).
(vii) Let a,b,c,d be positive integers with a <= b <= c and gcd(a,b,c,d) squarefree. Then, any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x+b*y+c*z-d*w a square, if and only if (a,b,c,d) is among the quadruples (1,1,2,1), (1,2,3,1), (1,2,3,3), (1,2,4,2), (1,2,4,4), (1,2,5,5), (1,2,6,2), (1,2,8,1), (2,2,4,4), (2,4,6,4), (2,4,6,6), and (2,4,8,2).
It is known that any natural number not of the form 4^k*(16*m+14) (k,m = 0,1,2,...) can be written as x^2 + y^2 + 2*z^2 = x^2 + y^2 + z^2 + z^2 with x,y,z nonnegative integers.
REFERENCES
L. E. Dickson, Modern Elementary Theory of Numbers, University of Chicago Press, Chicago, 1939, pp. 112-113.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Zhi-Wei Sun, On universal sums of polygonal numbers, arXiv:0905.0635 [math.NT], 2009-2015; Sci. China Math. 58(2015), 1367-1396.
Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.GM], 2016.
EXAMPLE
a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 1 = 1 > 0 < 1 and 1 - 1 = 0^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 = 1 = 1 < 2 and 1 - 1 = 0^2.
a(8) = 1 since 8 = 2^2 + 2^2 + 0^2 + 0^2 with 2 = 2 > 0 = 0 and 2 - 2 = 0^2.
a(11) = 1 since 11 = 1^2 + 1^2 + 0^2 + 3^2 with 1 = 1 > 0 < 3 and 1 - 1 = 0^2.
a(24) = 1 since 24 = 2^2 + 2^2 + 0^2 + 4^2 with 2 = 2 > 0 < 4 and 2 - 2 = 0^2.
a(47) = 1 since 47 = 3^2 + 3^2 + 2^2 + 5^2 with 3 = 3 > 2 < 5 and 3 - 3 = 0^2.
a(53) = 2 since 53 = 3^2 + 2^2 + 2^2 + 6^2 with 3 > 2 = 2 < 6 and 3 - 2 = 1^2, and also 53 = 6^2 + 2^2 + 2^2 + 3^2 with 6 > 2 = 2 < 3 and 6 - 2 = 2^2.
a(56) = 1 since 56 = 6^2 + 2^2 + 0^2 + 4^2 with 6 > 2 > 0 < 4 and 6 - 2 = 2^2.
a(120) = 1 since 120 = 8^2 + 4^2 + 2^2 + 6^2 with 8 > 4 > 2 < 6 and 8 - 4 = 2^2.
a(632) = 1 since 632 = 16^2 + 12^2 + 6^2 + 14^2 with 16 > 12 > 6 < 14 and 16 - 12 = 2^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[SQ[x-y]&&SQ[n-x^2-y^2-z^2], r=r+1], {z, 0, Sqrt[n/4]}, {y, z, Sqrt[(n-z^2)/2]}, {x, y, Sqrt[(n-y^2-z^2)]}]; Print[n, " ", r]; Continue, {n, 0, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Apr 13 2016
STATUS
approved