OFFSET
0,3
COMMENTS
Conjecture: 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, 1, 3, 7, 21, 24, 46, 79, 88, 94, 142, 151, 184, 190, 193, 280, 286, 1336.
By the author's 2017 JNT paper, any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2*(x-y) (or 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
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(21) = 1 since 21 = 2^2 + 0^2 + 1^2 + 4^2 with 0 = 0^2 and 2 - 0 = 2*1^2.
a(79) = 1 since 79 = 3^2 + 3^2 + 5^2 + 6^2 with 3*3 = 3^2 and 3 - 3 = 2*0^2.
a(142) = 1 since 142 = 6^2 + 4^2 + 3^2 + 9^2 with 4 = 2^2 and 6 - 4 = 2*1^2.
a(190) = 1 since 190 = 3^2 + 1^2 + 6^2 + 12^2 with 1 = 1^2 and 3 - 1 = 2*1^2.
a(193) = 1 since 193 = 0^2 + 0^2 + 7^2 + 12^2 with 0 = 0^2 and 0 - 0 = 2*0^2.
a(280) = 1 since 280 = 12^2 + 10^2 + 0^2 + 6^2 with 3*12 = 6^2 and 12 - 10 = 2*1^2.
a(1336) = 1 since 1336 = 2^2 + 0^2 + 6^2 + 36^2 with 0 = 0^2 and 2 - 0 = 2*1^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
tab={}; Do[r=0; Do[If[(SQ[3(2m^2+y)]||SQ[y])&&SQ[n-(2m^2+y)^2-y^2-z^2], r=r+1], {m, 0, (n/4)^(1/4)}, {y, 0, Sqrt[(n-4m^4)/2]}, {z, 0, Sqrt[Max[0, (n-(2m^2+y)^2-y^2)/2]]}]; tab=Append[tab, r], {n, 0, 80}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 11 2018
STATUS
approved