A282463 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers, x == y (mod 2) and z <= w such that both x and x^2 + 62*x*y + y^2 are squares.
1, 1, 2, 1, 3, 2, 2, 1, 2, 2, 3, 2, 3, 2, 2, 2, 3, 4, 5, 2, 6, 3, 2, 1, 3, 4, 4, 3, 2, 5, 2, 1, 4, 4, 5, 2, 8, 3, 3, 2, 4, 8, 5, 1, 3, 6, 2, 2, 3, 4, 7, 3, 8, 5, 5, 3, 4, 5, 3, 2, 4, 6, 3, 3, 3, 7, 8, 3, 9, 6, 3, 1, 5, 4, 6, 5, 4, 6, 2, 1, 4
Offset: 0
Keywords
Examples
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 == 1 (mod 2), 1 = 1^2 and 1^2 + 62*1*1 + 1^2 = 8^2. a(23) = 1 since 23 = 1^2 + 3^2 + 2^2 + 3^2 with 1 == 1 (mod 3), 1 = 1^2 and 1^2 + 62*1*3 + 3^2 = 14^2. a(30) = 2 since 30 = 0^2 + 2^2 + 1^2 + 5^2 with 0 == 2 (mod 3), 0 = 0^2 and 0^2 + 62*0*2 + 2^2 = 2^2, and 30 = 1^2 + 3^2 + 2^2 + 4^2 with 1 == 3 (mod 2), 1 = 1^2 and 1^2 + 62*1*3 + 3^2 = 14^2. a(79) = 1 since 79 = 1^2 + 7^2 + 2^2 + 5^2 with 1 == 7 (mod 2), 1 = 1^2 and 1^2 + 62*1*7 + 7^2 = 22^2. a(143) = 1 since 143 = 9^2 + 3^2 + 2^2 + 7^2 with 9 == 3 (mod 2), 9 = 3^2 and 9^2 + 62*9*3 + 3^2 = 42^2. a(303) = 1 since 303 = 1^2 + 3^2 + 2^2 + 17^2 with 1 == 3 (mod 2), 1 = 1^2 and 1^2 + 62*1*3 + 3^2 = 14^2. a(723) = 1 since 723 = 1^2 + 7^2 + 12^2 + 23^2 with 1 == 7 (mod 2), 1 = 1^2 and 1^2 + 62*1*7 + 7^2 = 22^2. a(1591) = 1 since 1591 = 9^2 + 9^2 + 23^2 + 30^2 with 9 == 9 (mod 2), 9 = 3^2 and 9^2 + 62*9*9 + 9^2 = 72^2. a(1723) = 1 since 1723 = 1^2 + 1^2 + 11^2 + 40^2 with 1 == 1 (mod 2), 1 = 1^2 and 1^2 + 62*1*1 + 1^2 = 8^2. a(3571) = 1 since 3571 = 9^2 + 3^2 + 0^2 + 59^2 with 9 == 3 (mod 2), 9 = 3^2 and 9^2 + 62*9*3 + 3^2 = 42^2. a(3911) = 1 since 9^2 + 3^2 + 10^2 + 61^2 with 9 == 3 (mod 2), 9 = 3^2 and 9^2 + 62*9*3 + 3^2 = 42^2.
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.
- Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; Do[r=0;Do[If[SQ[n-x^4-y^2-z^2]&&Mod[x-y,2]==0&&SQ[x^4+62*x^2*y+y^2],r=r+1],{x,0,n^(1/4)},{y,0,Sqrt[n-x^4]},{z,0,Sqrt[(n-x^4-y^2)/2]}];Print[n," ",r];Continue,{n,0,80}]
Comments