OFFSET
1,5
COMMENTS
Conjecture 1: a(n) > 0 if n is neither of the form 4^k*(4*m+3) (k>=0, m>=0) nor of the form 2^(4*k+3)*101 (k>=0). In particular, a(n^2) > 0 and a(2*n^2) > 0 for all n > 0.
Conjecture 2: Any positive integer not of the form 16^k*m (k>=0, m = 1, 25, 46, 88) can be written as x^2 + y^2 + z^2 + w^2 (x,y,z,w >= 0) such that 2*x - y = 4^a for some nonnegative integer a.
Conjecture 3: Any positive integer of the form 2^k*(2*m+1) (k>=0, m>=0) with k == floor(m/2) (mod 2) (such as positive squares) can be written as x^2 + y^2 + z^2 + w^2 (x,y,z,w >= 0) such that x + 3*y = 4^a for some nonnegative integer a.
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. See also arXiv:1604.06723 [math.NT].
Zhi-Wei Sun, Restricted sums of four squares, Int. J. Number Theory 15(2019), 1863-1893. See also arXiv:1701.05868 [math.NT].
Zhi-Wei Sun, Sums of four squares with certain restrictions, arXiv:2010.05775 [math.NT], 2020.
EXAMPLE
a(7) = 1, and 7 = 2^2 + 1^2 + 1^2 + 1^2 with 2 + 2*1 = 4.
a(35) = 1, and 35 = 1^2 + 0^2 + 3^2 + 5^2 with 1 + 2*0 = 4^0.
a(49) = 1, and 49 = 0^2 + 2^2 + 3^2 + 6^2 with 0 + 2*2 = 4.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
PQ[n_]:=PQ[n]=n>0&&IntegerQ[Log[4, n]];
tab={}; Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&PQ[x+2y], r=r+1], {x, 0, Sqrt[n]}, {y, 0, Sqrt[n-x^2]}, {z, 0, Sqrt[(n-x^2-y^2)/2]}]; tab=Append[tab, r], {n, 1, 80}]; tab
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 30 2020
STATUS
approved