A337743 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x + 2*y a power of four (including 4^0 = 1), where x, y, z, w are nonnegative integers with z <= w.
1, 1, 1, 1, 3, 3, 1, 1, 3, 2, 1, 1, 2, 3, 1, 1, 3, 3, 1, 2, 4, 2, 1, 2, 2, 3, 1, 0, 3, 4, 1, 1, 3, 2, 1, 2, 2, 2, 1, 1, 5, 3, 0, 1, 3, 2, 0, 1, 1, 3, 2, 2, 5, 6, 3, 3, 5, 2, 1, 1, 4, 5, 3, 1, 6, 8, 0, 4, 9, 5, 2, 3, 4, 4, 1, 1, 7, 6, 3, 3
Offset: 1
Keywords
Examples
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.
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.
Crossrefs
Programs
-
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
Comments