A338162 Number of ways to write 4*n + 1 as x^2 + y^2 + z^2 + w^2 with x^2 + 7*y^2 = 2^k for some k = 0,1,2,..., where x, y, z, w are nonnegative integers with z <= w.
1, 2, 3, 2, 4, 4, 2, 3, 6, 3, 7, 6, 5, 6, 7, 3, 8, 9, 5, 6, 8, 4, 8, 7, 4, 8, 11, 3, 7, 8, 6, 8, 13, 6, 6, 8, 6, 9, 11, 8, 10, 12, 7, 7, 12, 5, 14, 14, 7, 7, 13, 5, 13, 13, 5, 8, 13, 8, 10, 10, 7, 13, 10, 6, 9, 14, 9, 10, 15, 7, 10
Offset: 0
Keywords
Examples
a(0) = 1, and 4*0 + 1 = 1^2 + 0^2 + 0^2 +0^2 with 1^2 + 7*0^2 = 2^0. a(25) = 2, and 25 = 2^2 + 2^2 + 1^2 + 4^2 = 4^2 + 0^2 + 0^2 + 3^2 with 2^2 + 7*2^2 = 2^5 and 4^2 + 7*0^2 = 2^4.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..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.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; PQ[n_]:=PQ[n]=IntegerQ[Log[2,n]]; tab={};Do[r=0;Do[If[SQ[4n+1-x^2-y^2-z^2]&&PQ[x^2+7y^2],r=r+1],{x,1,Sqrt[4n+1]},{y,0,Sqrt[4n+1-x^2]},{z,0,Sqrt[(4n+1-x^2-y^2)/2]}];tab=Append[tab,r],{n,0,70}];tab
Comments