A282091 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x + y - z a cube of an integer, where x,y,z,w are nonnegative integers with x >= y <= z and x == y (mod 2).
1, 2, 1, 1, 2, 2, 2, 2, 1, 3, 2, 1, 3, 1, 2, 2, 1, 4, 1, 2, 2, 2, 2, 1, 2, 3, 4, 2, 3, 2, 2, 1, 1, 5, 2, 3, 4, 2, 1, 2, 1, 4, 5, 1, 4, 2, 1, 2, 1, 5, 3, 3, 3, 1, 3, 4, 1, 4, 2, 1, 5, 3, 4, 2, 3, 5, 3, 3, 6, 3, 5, 3, 4, 6, 1, 3, 5, 3, 2, 3, 2
Offset: 0
Keywords
Examples
a(2) = 1 since 2 = 0^2 + 0^2 + 1^2 + 1^2 with 0 = 0 < 1, 0 == 0 (mod 2), and 0 + 0 - 1 = (-1)^3. a(13) = 1 since 13 = 2^2 + 0^2 + 3^2 + 0^2 with 2 > 0 < 3, 2 == 0 (mod 2), and 2 + 0 - 3 = (-1)^3. a(18) = 1 since 18 = 2^2 + 2^2 + 3^2 + 1^2 with 2 = 2 < 3, 2 == 2 (mod 2), and 2 + 2 - 3 = 1^3. a(31) = 1 since 31 = 1^2 + 1^2 + 2^2 + 5^2 with 1 = 1 < 2, 1 == 1 (mod 2), and 1 + 1 - 2 = 0^3. a(95) = 1 since 95 = 9^2 + 1^2 + 2^2 + 3^2 with 9 > 1 < 2, 9 == 1 (mod 2), and 9 + 1 - 2 = 2^3. a(479) = 1 since 479 = 15^2 + 7^2 + 14^2 + 3^2 with 15 > 7 < 14, 15 == 7 (mod 2), and 15 + 7 - 14 = 2^3. a(653) = 1 since 653 = 12^2 + 8^2 + 21^2 + 2^2 with 12 > 8 < 21, 12 == 8 (mod 2), and 12 + 8 - 21 = (-1)^3. a(1424) = 1 since 1424 = 8^2 + 0^2 + 8^2 + 36^2 with 8 > 0 < 8, 8 == 0 (mod 2), and 8 + 0 - 8 = 0^3. a(2576) = 0 since 2576 = 24^2 + 16^2 + 40^2 + 12^2 with 24 > 16 < 40, 24 == 16 (mod 2), and 24 + 16 - 40 = 0^3. a(2960) = 1 since 2960 = 24^2 + 8^2 + 32^2 + 36^2 with 24 > 8 < 32, 24 == 8 (mod 2), and 24 + 8 - 32 = 0^3.
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.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; CQ[n_]:=CQ[n]=IntegerQ[CubeRoot[n]]; Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&CQ[x+y-z]&&Mod[x-y,2]==0,r=r+1],{y,0,Sqrt[n/3]},{x,y,Sqrt[n-y^2]},{z,y,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,0,80}]
Comments