OFFSET
0,2
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, 8, 12, 23, 24, 44, 47, 56, 71, 79, 92, 95, 140, 168, 184, 248, 344, 428, 568, 632, 1144, 1544.
By the author's 2017 JNT paper, each nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 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(71) = 1 since 71 = 5^2 + 1^2 + 3^2 + 6^2 with 1 = 1^2 and 5 - 1 = 2^2.
a(95) = 1 since 95 = 2^2 + 1^2 + 3^2 + 9^2 with 1 = 1^2 and 2 - 1 = 1^2.
a(344) = 1 since 344 = 4^2 + 0^2 + 2^2 + 18^2 with 4 = 2^2 and 4 - 0 = 2^2.
a(428) = 1 since 428 = 13^2 + 9^2 + 3^2 + 13^2 with 9 = 3^2 and 13 - 9 = 2^2.
a(632) = 1 since 632 = 16^2 + 12^2 + 6^2 + 14^2 with 16 = 4^2 and 16 - 12 = 2^2.
a(1144) = 1 since 1144 = 20^2 + 16^2 + 2^2 + 22^2 with 16 = 4^2 and 20 - 16 = 2^2.
a(1544) = 1 since 1544 = 0^2 + 0^2 + 10^2 + 38^2 with 0 = 0^2 and 0 - 0 = 0^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
tab={}; Do[r=0; Do[If[(SQ[m^2+y]||SQ[y])&&SQ[n-(m^2+y)^2-y^2-z^2], r=r+1], {m, 0, n^(1/4)}, {y, 0, Sqrt[(n-m^4)/2]}, {z, 0, Sqrt[Max[0, (n-(m^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