OFFSET
1,6
COMMENTS
Conjecture 1: a(n) > 0 for all n > 0. Also, for any integer n > 1 we can write n^2 as x^2 + y^2 + z^2 + w^2 with x >= y >= 0 <= z <= w such that 2*x or y is a power of 4 and also x + 15*y = 2^(2k+1) for some k = 0,1,2,....
Conjecture 2: Let d be 2 or 8, and let r be 0 or 1. Then any positive square n^2 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x or y is a power of 2 and x + d*y = 2^(2k+r) for some k = 0,1,2,....
We have verified Conjecture 1 for n up to 10^7.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..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(2) = 1 since 2^2 = 1^2 + 1^2 + 1^2 + 1^2 with 1 = 4^0 and 1 + 15*1 = 4^2.
a(5) = 1 since 5^2 = 4^2 + 0^2 + 0^2 + 3^2 with 4 = 4^1 and 4 + 15*0 = 4^1.
a(19) = 1 since 19^2 = 1^2 + 0^2 + 6^2 + 18^2 with 1 = 4^0 and 1 + 15*0 = 4^0.
a(159) = 1 since 159^2 = 34^2 + 2^2 + 75^2 + 136^2 with 2*2 = 4^1 and 34 + 15*2 = 4^3.
a(1998) = 1 since 1998^2 = 256^2 + 256^2 + 286^2 + 1944^2 with 256 = 4^4 and 256 + 15*256 = 4^6.
a(3742) = 1 since 3742^2 = 2176^2 + 128^2 + 98^2 + 3040^2 with 2*128 = 4^4 and 2176 + 15*128 = 4^6.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
Pow[n_]:=Pow[n]=IntegerQ[Log[4, n]];
tab={}; Do[r=0; Do[If[Pow[2y]||Pow[4^k-15y], Do[If[SQ[n^2-y^2-(4^k-15y)^2-z^2], r=r+1], {z, 0, Sqrt[Max[0, (n^2-y^2-(4^k-15y)^2)/2]]}]],
{k, 0, Log[4, Sqrt[226]*n]}, {y, 0, Min[n, 4^(k-2)]}]; tab=Append[tab, r], {n, 1, 80}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 04 2018
STATUS
approved