OFFSET
0,2
COMMENTS
Conjecture 1: a(n) > 0 for all n = 0,1,2,....
Conjecture 2: Any nonnegative integer n not equal to 3 can be written as x^2 + y^2 + z^2 + w^2 with nonnegative integers x,y,z,w such that x or 2*y is a square and 3*x - y is also a square.
By the author's 2017 JNT paper, each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with integers x,y,z,w such that x (or 2*x) is a square.
a(n) > 0 for all n = 0..10^8. - Zhi-Wei Sun, Oct 04 2020
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Yue-Feng She and Hai-Liang Wu, Proof of a conjecture of Sun on sums of four squares, arXiv:2010.02067 [math.NT], 2020.
Yue-Feng She and Hai-Liang Wu, Sums of four squares with a certain restriction, Bull. of the Australian Math. Soc. (2021) First View, 1-10.
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.
EXAMPLE
a(8) = 1 since 8 = 0^2 + 0^2 + 2^2 + 2^2 with 0 = 0^2 and 0 + 3*0 = 0^2.
a(23) = 1 since 23 = 3^2 + 2^2 + 1^2 + 3^2 with 2*2 = 2^2 and 3 + 3*2 = 3^2.
a(56) = 1 since 56 = 4^2 + 0^2 + 2^2 + 6^2 with 4 = 2^2 and 4 + 3*0 = 2^2.
a(140) = 1 since 140 = 10^2 + 2^2 + 0^2 + 6^2 with 2*2 = 2^2 and 10 + 3*2 = 4^2.
a(472) = 1 since 472 = 0^2 + 12^2 + 2^2 + 18^2 with 0 = 0^2 and 0 + 3*12 = 6^2.
a(959) = 1 since 959 = 9^2 + 9^2 + 11^2 + 26^2 with 9 = 3^2 and 9 + 3*9 = 6^2.
a(1839) = 1 since 1839 = 1^2 + 5^2 + 7^2 + 42^2 with 1 = 1^2 and 1 + 3*5 = 4^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
tab={}; Do[r=0; Do[If[(SQ[m^2-3y]||SQ[2y])&&SQ[n-(m^2-3y)^2-y^2-z^2], r=r+1], {m, 0, (10n)^(1/4)}, {y, 0, Min[m^2/3, Sqrt[n]]}, {z, 0, Sqrt[Max[0, (n-(m^2-3y)^2-y^2)/2]]}]; tab=Append[tab, r], {n, 0, 80}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 10 2018
STATUS
approved