OFFSET
1,1
COMMENTS
Conjecture 1: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*m with k = 0,1,2,... and m = 2, 3, 6, 10, 38.
Conjecture 2: For any positive integer n, we can write 2*n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x + 3*y + 5*z + 15*w is twice a power of 4.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..225
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(1) = 2 since 2*1^2 = 1^2 + 1^2 + 0^2 + 0^2 with 1 + 3*1 + 5*0 + 15*0 = 4, and 2*1^2 = 1^2 + 0^2 + 0^2 + 1^2 with 1 + 3*0 + 5*0 + 15*1 = 4^2.
a(2) = 1 since 2*2^2 = 0^2 + 2^2 + 2^2 + 0^2 with 0 + 3*2 + 5*2 + 15*0 = 4^2.
a(3) = 1 since 2*3^2 = 1^2 + 1^2 + 0^2 + 4^2 with 1 + 3*1 + 5*0 + 15*4 = 4^3.
a(6) = 1 since 2*6^2 = 0^2 + 8^2 + 2^2 + 2^2 with 0 + 3*8 + 5*2 + 15*2 = 4^3.
a(10) = 1 since 2*10^2 = 10^2 + 8^2 + 6^2 + 0^2 with 10 + 3*8 + 5*6 + 15*0 = 4^3.
a(38) = 1 since 2*38^2 = 34^2 + 34^2 + 24^2 + 0^2 with 34 + 3*34 + 5*24 + 15*0 = 4^4.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
Pow[n_]:=Pow[n]=IntegerQ[Log[4, n]]
tab={}; Do[r=0; Do[If[SQ[2n^2-x^2-y^2-z^2]&&Pow[x+3y+5z+15*Sqrt[2n^2-x^2-y^2-z^2]], r=r+1], {x, 0, Sqrt[2]n}, {y, 0, Sqrt[2n^2-x^2]}, {z, 0, Sqrt[2n^2-x^2-y^2]}]; tab=Append[tab, r], {n, 1, 80}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 28 2018
STATUS
approved