OFFSET
1,1
COMMENTS
Conjecture: a(n) > 0 for all n > 0. Moreover, any positive integer n congruent to 1 or 2 modulo 4 can be written as x^2 + y^2 + z^2 + w^2 with x, y, z, w nonnegative integers such that 2*x^2 + 4*y^2 - 7*x*y = 4^k for some positive integer k.
We have verified this for all n = 1..10^8.
See also A338139 for a similar conjecture.
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 = 1^2 + 2^2 + 1^2 + 1^2 with 2*1^2 + 4*2^2 - 7*1*2 = 2^2.
a(43) = 1, and 43 = 4^2 + 1^2 + 1^2 + 5^2 with 2*4^2 + 4*1^2 - 7*4*1 = 2^3.
a(283) = 1, and 283 = 4^2 + 7^2 + 7^2 + 13^2 with 2*4^2 + 4*7^2 - 7*4*7 = 2^5.
a(2731) = 1, and 2731 = 5^2 + 7^2 + 16^2 + 49^2 with 2*5^2 + 4*7^2 - 7*5*7 = 2^0.
a(25475) = 1, and 25475 = 68^2 + 95^2 + 45^2 + 99^2 with 2*68^2 + 4*95^2 - 7*68*95 = 2^7.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
PQ[n_]:=PQ[n]=n>0&&IntegerQ[Log[2, n]];
tab={}; Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&PQ[2x^2+4*y^2-7*x*y], r=r+1], {x, 0, Sqrt[n]}, {y, Boole[x==0], Sqrt[n-x^2]}, {z, 0, Sqrt[(n-x^2-y^2)/2]}]; tab=Append[tab, r], {n, 1, 100}]; tab
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 12 2020
STATUS
approved