A281729 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,z positive integers and y,w nonnegative integers such that both 9*x^2 + 246*x*y + y^2 and 9*z^2 + 666*z*w + w^2 are squares.
0, 1, 2, 1, 2, 4, 2, 1, 4, 5, 2, 2, 4, 3, 1, 1, 5, 5, 3, 4, 6, 6, 2, 4, 5, 5, 5, 3, 5, 5, 3, 1, 7, 8, 2, 5, 6, 7, 2, 5, 7, 4, 2, 3, 7, 4, 3, 2, 5, 7, 5, 6, 7, 12, 4, 3, 7, 7, 2, 1, 7, 5, 4, 1, 7, 7, 3, 7, 8, 6, 2, 5, 7, 6, 4, 4, 8, 4, 1, 4
Offset: 1
Keywords
Examples
a(2) = 1 since 2 = 1^2 + 0^2 + 1^2 + 0^2 with 9*1^2 + 246*1*0 + 1^2 = 3^2 and 9*1^2 + 666*1*0 + 0^2 = 3^2. a(4) = 1 since 4 = 1^2 + 1^2 + 1^2 + 1^2 with 9*1^2 + 246*1*1 + 1^2 = 16^2 and 9*1^2 + 666*1*1 + 1^2 = 26^2. a(15) = 1 since 15 = 2^2 + 3^2 + 1^2 + 1^2 with 9*2^2 + 246*2*3 + 3^2 = 39^2 and 9*1^2 + 666*1*1 + 1^2 = 26^2. a(159) = 1 since 159 = 11^2 + 3^2 + 5^2 + 2^2 with 9*11^2 + 246*11*3 + 3^2 = 96^2 and 9*5^2 + 666*5*2 + 2^2 = 83^2. a(515) = 1 since 515 = 15^2 + 0^2 + 17^2 + 1^2 with 9*15^2 + 246*15*0 + 0^2 = 45^2 and 9*17^2 + 666*17*1 + 1^2 = 118^2. a(9795) = 1 since 9795 = 35^2 + 91^2 + 17^2 + 0^2 with 9*35^2 + 246*35*91 + 91^2 = 896^2 and 9*17^2 + 666*17*0 + 0^2 = 51^2. a(84155) = 1 since 84155 = 281^2 + 0^2 + 35^2 + 63^2 with 9*281^2 + 246*281*0 + 0^2 = 843^2 and 9*35^2 + 666*35*63 + 63^2 = 1218^2. a(121003) = 1 since 121003 = 319^2 + 87^2 + 3^2 + 108^2 with 9*319^2 + 246*319*87 + 87^2 = 2784^2 and 9*3^2 + 666*3*108 + 108^2 = 477^2. a(133647) = 1 since 133647 = 217^2 + 217^2 + 115^2 + 162^2 with 9*217^2 + 246*217*217 + 217^2 = 3472^2 and 9*115^2 + 666*115*162 + 162^2 = 3543^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..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[9x^2+246x*y+y^2],Do[If[SQ[n-x^2-y^2-z^2]&&SQ[9z^2+666z*Sqrt[n-x^2-y^2-z^2]+(n-x^2-y^2-z^2)],r=r+1],{z,1,Sqrt[n-x^2-y^2]}]],{x,1,Sqrt[n]},{y,0,Sqrt[n-x^2]}];Print[n," ",r];Continue,{n,1,80}]
Comments