login
A300667
Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z <= w such that 3*x or y is a square and x + 2*y is also a square.
15
1, 2, 2, 1, 2, 4, 3, 1, 2, 4, 3, 1, 1, 3, 3, 1, 2, 5, 6, 3, 4, 5, 4, 2, 2, 5, 6, 3, 1, 4, 5, 2, 2, 4, 5, 3, 4, 4, 3, 1, 2, 6, 5, 3, 2, 4, 3, 1, 1, 3, 7, 4, 4, 5, 7, 4, 2, 4, 5, 3, 1, 2, 3, 3, 2, 6, 8, 4, 7, 7, 5, 1, 3, 4, 4, 4, 3, 4, 3, 3, 4
OFFSET
0,2
COMMENTS
Conjecture 1: a(n) > 0 for all n >= 0, and a(n) = 1 only for n = 16^k*m with k = 0,1,2,... and m = 0, 3, 7, 11, 12, 15, 28, 39, 47, 60, 71, 92, 119, 172, 232, 253, 263, 316, 347, 515.
Conjecture 2: Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 3*x or y is a square and 2*x - y is also a square.
By the author's 2017 JNT paper, any nonnegative integer can be written as the sum of a fourth power and three squares.
See also A281976, A300666, A300708 and A300712 for similar conjectures.
a(n) > 0 for all n = 0..10^8. Also, Conjecture 2 holds for all n = 0..10^8. In a 2018 paper Y.-C. Sun and Z.-W. Sun proved that any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x + 2*y a square, where x,y,z,w are nonnegative integers. - Zhi-Wei Sun, Oct 04 2020
REFERENCES
Yu-Chen Sun and Zhi-Wei Sun, Some variants of Lagrange's four squares theorem, Acta Arith. 183(2018), 339-356.
LINKS
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.
Yu-Chen Sun and Zhi-Wei Sun, Some variants of Lagrange's four squares theorem, arXiv:1605.03074 [math.NT], 2016-2018.
EXAMPLE
a(12) = 1 since 12 = 0^2 + 2^2 + 2^2 + 2^2 with 3*0 = 0^2 and 0 + 2*2 = 2^2.
a(39) = 1 since 39 = 2^2 + 1^2 + 3^2 + 5^2 with 1 = 1^2 and 2 + 2*1 = 2^2.
a(172) = 1 since 172 = 7^2 + 1^2 + 1^2 + 11^2 with 1 = 1^2 and 7 + 2*1 = 3^2.
a(232) = 1 since 232 = 0^2 + 0^2 + 6^2 + 14^2 with 0 = 0^2 and 0 + 2*0 = 0^2.
a(253) = 1 since 253 = 8^2 + 4^2 + 2^2 + 13^2 with 4 = 2^2 and 8 + 2*4 = 4^2.
a(263) = 1 since 263 = 3^2 + 3^2 + 7^2 + 14^2 with 3*3 = 3^2 and 3 + 2*3 = 3^2.
a(515) = 1 since 515 = 1^2 + 0^2 + 15^2 + 17^2 with 0 = 0^2 and 1 + 2*0 = 1^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
tab={}; Do[r=0; Do[If[(SQ[3(m^2-2y)]||SQ[y])&&SQ[n-(m^2-2y)^2-y^2-z^2], r=r+1], {m, 0, (5n)^(1/4)}, {y, 0, Min[m^2/2, Sqrt[n]]}, {z, 0, Sqrt[Max[0, (n-(m^2-2y)^2-y^2)/2]]}]; tab=Append[tab, r], {n, 0, 80}]; Print[tab]
PROG
(PARI) A300667(n)=sum(x=0, sqrtint(n), sum(y=0, sqrtint(n-x^2), if(issquare(x+2*y)&&(issquare(y)||issquare(3*x)), if(n>x^2+y^2, A000161(n-x^2-y^2), 1)))) \\ M. F. Hasler, Mar 11 2018
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 10 2018
STATUS
approved