OFFSET
1,6
COMMENTS
Conjecture (i): a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*m with k = 0,1,2,... and m = 1, 2, 3, 5, 7, 11, 15, 19, 43, 47, 135, 1103.
Conjecture (ii): For any integer n > 1, we can write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2*x or 2*y is a power of 4 and 2*(x+3*y) is also a power of 4.
Note that 81503^2 cannot be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and both x and x + 3*y in the set {4^k: k = 0,1,2,...}. However, 81503^2 = 16372^2 + 4^2 + 52372^2 + 60265^2 with 4 = 4^1 and 16372 + 3*4 = 4^7.
We have verified that the conjecture for n up to 10^7.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..2000
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(2) = 1 since 2^2 = 1^2 + 1^2 + 1^2 + 1^2 with 1 = 4^0 and 1 + 3*1 = 4^1.
a(5) = 1 since 5^2 = 4^2 + 0^2 + 0^2 + 3^2 with 4 = 4^1 and 4 + 3*0 = 4^1.
a(19) = 1 since 19^2 = 1^2 + 0^2 + 6^2 + 18^2 with 1 = 4^0 and 1 + 3*0 = 4^0.
a(43) = 1 since 43^2 = 4^2 + 20^2 + 8^2 + 37^2 with 4 = 4^1 and 4 + 3*20 = 4^3.
a(135) = 1 since 135^2 = 16^2 + 16^2 + 17^2 + 132^2 with 16 = 4^2 and 16 + 3*16 = 4^3.
a(1103) = 1 since 1103^2 = 4^2 + 4^2 + 716^2 + 839^2 with 4 = 4^1 and 4 + 3*4 = 4^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
Pow[n_]:=Pow[n]=IntegerQ[Log[4, n]];
tab={}; Do[r=0; Do[If[(Pow[y]||Pow[4^k-3y])&&SQ[n^2-y^2-(4^k-3y)^2-z^2], r=r+1], {k, 0, Log[4, Sqrt[10]*n]}, {y, 0, Min[n, 4^k/3]}, {z, 0, Sqrt[Max[0, (n^2-y^2-(4^k-3y)^2)/2]]}]; tab=Append[tab, r], {n, 1, 80}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 04 2018
STATUS
approved