A282561 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that both 2*x - y and 4*z^2 + 724*z*w + w^2 are squares.
1, 2, 2, 2, 4, 3, 5, 1, 3, 4, 2, 2, 2, 5, 7, 3, 2, 5, 3, 1, 4, 7, 7, 3, 2, 2, 2, 4, 3, 8, 8, 3, 2, 2, 4, 4, 9, 3, 9, 3, 4, 5, 6, 3, 3, 7, 5, 2, 2, 11, 6, 5, 4, 7, 7, 4, 2, 4, 3, 2, 2, 5, 10, 6, 4, 5, 9, 1, 7, 8, 10, 4, 4, 5, 6, 5, 3, 9, 3, 2, 3
Offset: 0
Keywords
Examples
a(7) = 1 since 7 = 1^2 + 2^2 + 1^2 + 1^2 with 2*1 - 2 = 0^2 and 4*1^2 + 724*1*1 + 1^2 = 27^2. a(19) = 1 since 19 = 1^2 + 1^2 + 1^2 + 4^2 with 2*1 - 1 = 1^2 and 4*1^2 + 724*1*4 + 4^2 = 54^2. a(67) = 1 since 67 = 4^2 + 7^2 + 1^2 + 1^2 with 2*4 - 7 = 1^2 and 4*1^2 + 724*1*1 + 1^2 = 27^2. a(191) = 1 since 191 = 9^2 + 2^2 + 5^2 + 9^2 with 2*9 - 2 = 4^2 and 4*5^2 + 724*5*9 + 9^2 = 181^2. a(235) = 1 since 235 = 7^2 + 13^2 + 1^2 + 4^2 with 2*7 - 13 = 1^2 and 4*1^2 + 724*1*4 + 4^2 = 54^2. a(265) = 1 since 265 = 4^2 + 7^2 + 10^2 + 10^2 with 2*4 - 7 = 1 and 4*10^2 + 724*10*10 + 10^2 = 270^2. a(347) = 1 since 347 = 8^2 + 7^2 + 15^2 + 3^2 with 2*8 - 7 = 3^2 and 4*15^2 + 724*15*3 + 3^2 = 183^2. a(888) = 1 since 888 = 14^2 + 12^2 + 8^2 + 22^2 with 2*14 - 12 = 4^2 and 4*8^2 + 724*8*22 + 22^2 = 358^2. a(2559) = 1 since 2559 = 26^2 + 3^2 + 5^2 + 43^2 with 2*26 - 3 = 7^2 and 4*5^2 + 724*5*43 + 43^2 = 397^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[2x-y],Do[If[SQ[n-x^2-y^2-z^2]&&SQ[4z^2+724z*Sqrt[n-x^2-y^2-z^2]+(n-x^2-y^2-z^2)],r=r+1],{z,0,Sqrt[n-x^2-y^2]}]],{y,0,Sqrt[4n/5]},{x,Ceiling[y/2],Sqrt[n-y^2]}];Print[n," ",r];Continue,{n,0,80}]
Comments