A279056 Number of ways to write n as w^2 + x^2 + y^2 + z^2 with w a positive integer and x,y,z nonnegative integers such that x^3 + 4*y*z*(y-z) is a square.
1, 3, 3, 2, 5, 5, 2, 2, 4, 9, 5, 3, 7, 4, 3, 1, 7, 13, 6, 7, 9, 4, 2, 4, 10, 13, 10, 4, 9, 6, 3, 3, 9, 15, 7, 10, 8, 6, 5, 6, 14, 14, 7, 3, 14, 7, 2, 3, 5, 14, 12, 11, 12, 9, 5, 5, 9, 12, 6, 6, 10, 5, 4, 2, 11, 20, 10, 10, 12, 4, 2, 6, 13, 14, 10, 4, 7, 5, 1, 5
Offset: 1
Keywords
Examples
a(1) = 1 since 1 = 1^2 + 0^2 + 0^2 + 0^2 with 0^3 + 4*0*0*(0-0) = 0^2. a(79) = 1 since 79 = 7^2 + 1^2 + 5^2 + 2^2 with 1^3 + 4*5*2*(5-2) = 11^2. a(143) = 1 since 143 = 9^2 + 1^2 + 6^2 + 5^2 with 1^3 + 4*6*5*(6-5) = 11^2. a(184) = 1 since 184 = 10^2 + 8^2 + 4^2 + 2^2 with 8^3 + 4*4*2*(4-2) = 24^2. a(575) = 1 since 575 = 1^2 + 22^2 + 3^2 + 9^2 with 22^3 + 4*3*9*(3-9) = 100^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.GM], 2016.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; table={};Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[x^3+4y*z(y-z)],r=r+1],{x,0,Sqrt[n-1]},{y,0,Sqrt[n-1-x^2]},{z,0,Sqrt[n-1-x^2-y^2]}];table=Append[table,r];Continue,{n,1,80}]
Comments