cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 22 results. Next

A272620 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with w + x + y - z a square, where w is an integer and x,y,z are nonnegative integers with |w| <= x >= y <= z < x + y.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 1, 4, 1, 1, 3, 3, 2, 3, 1, 7, 1, 2, 3, 2, 1, 3, 3, 7, 2, 3, 1, 7, 1, 1, 4, 5, 3, 2, 1, 9, 2, 5, 3, 6, 5, 3, 3, 7, 2, 2, 5, 6, 3, 3, 5, 9, 4, 4, 4, 9, 4, 4, 5, 6, 6, 1, 6, 12, 2, 2, 7, 4, 4, 6, 5, 11, 7, 3, 5, 9, 4, 5
Offset: 1

Views

Author

Zhi-Wei Sun, May 03 2016

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
In contrast, the author has proved that any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z integers such that x + y + z is a square. See arXiv:1604.06723.
Yu-Chen Sun and the author proved in arXiv:1605.03074 that any nonnegative integer can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z integers such that w + x + y + z is a square. - Zhi-Wei Sun, May 10 2016

Examples

			a(1) = 1 since 1 = 0^2 + 1^2 + 0^2 + 0^2 with 0 < 1 > 0 = 0 < 1 + 0 and 0 + 1 + 0 - 0 = 1^2.
a(2) = 1 since 2 = (-1)^2 + 1^2 + 0^2 + 0^2 with 1 = 1 > 0 = 0 < 1 + 0 and -1 + 1 + 0 - 0 = 0^2.
a(3) = 1 since 3 = 0^2 + 1^2 + 1^2 + 1^2 with 0 < 1 = 1 = 1 < 1 + 1 and 0 + 1 + 1 - 1 = 1^2.
a(4) = 1 since 4 = (-1)^2 + 1^2 + 1^2 + 1^2 with 1 = 1 = 1 = 1 < 1 + 1 and -1 + 1 + 1 - 1 = 0^2.
a(6) = 1 since 6 = (-1)^2 + 2^2 + 0^2 + 1^2 with 1 < 2 > 0 < 1 < 2 + 0 and -1 + 2 + 0 - 1 = 0^2.
a(7) = 1 since 7 = (-1)^2 + 2^2 + 1^2 + 1^2 with 1 < 2 > 1 = 1 < 2 + 1 and -1 + 2 + 1 - 1 = 1^2.
a(9) = 1 since 9 = 0^2 + 2^2 + 1^2 + 2^2 with 0 < 2 > 1 < 2 < 2 + 1 and 0 + 2 + 1 - 2 = 1^2.
a(11) = 1 since 11 = (-1)^2 + 3^2 + 0^2 + 1^2 with 1 < 3 > 0 < 1 < 3 + 0 and -1 + 3 + 0 - 1 = 1^2.
a(12) = 1 since 12 = 1^2 + 3^2 + 1^2 + 1^2 with 1 < 3 > 1 = 1 < 3 + 1 and 1 + 3 + 1 - 1 = 2^2.
a(17) = 1 since 17 = 0^2 + 2^2 + 2^2 + 3^2 with 0 < 2 = 2 < 3 < 2 + 2 and 0 + 2 + 2 - 3 = 1^2.
a(19) = 1 since 19 = 0^2 + 3^2 + 1^2 + 3^2 with 0 < 3 > 1 < 3 < 3 + 1 and 0 + 3 + 1 - 3 = 1^2.
a(23) = 1 since 23 = (-1)^2 + 3^2 + 2^2 + 3^2 with 1 < 3 > 2 < 3 < 3 + 2 and -1 + 3 + 2 - 3 = 1^2.
a(29) = 1 since 29 = 0^2 + 3^2 + 2^2 + 4^2 with 0 < 3 > 2 < 4 < 3 + 2 and 0 + 3 + 2 - 4 = 1^2.
a(31) = 1 since 31 = (-2)^2 + 3^2 + 3^2 + 3^2 with 2 < 3 = 3 = 3 < 3 + 3 and -2 + 3 + 3 - 3 = 1^2.
a(37) = 1 since 37 = (-1)^2 + 4^2 + 2^2 + 4^2 with 1 < 4 > 2 < 4 < 4 + 2 and -1 + 4 + 2 - 4 = 1^2.
a(92) = 1 since 92 = 3^2 + 5^2 + 3^2 + 7^2 with 3 < 5 > 3 < 7 < 5 + 3 and 3 + 5 + 3 - 7 = 2^2.
a(284) = 1 since 284 = 3^2 + 9^2 + 5^2 + 13^2 with 3 < 9 > 5 < 13 < 9 + 5 and 3 + 9 + 5 - 13 = 2^2.
a(572) = 1 since 572 = 3^2 + 11^2 + 9^2 + 19^2 with 3 < 11 > 9 < 19 < 11 + 9 and 3 + 11 + 9 - 19 = 2^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[Sqrt[n-x^2-y^2-z^2]<=x&&SQ[n-x^2-y^2-z^2]&&SQ[x+y-z+(-1)^k*Sqrt[n-x^2-y^2-z^2]],r=r+1],{y,0,Sqrt[n/3]},{x,y,Sqrt[n-y^2]},{z,y,Min[x+y-1,Sqrt[n-x^2-y^2]]},{k,0,Min[1,Sqrt[n-x^2-y^2-z^2]]}];Print[n," ",r];Continue,{n,1,80}]

Extensions

Rick L. Shepherd, May 27 2016: I checked all the statements in each example.

A261876 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (5*x^2+7*y^2+9*z^2)*y*z a square, where x,y,z,w are nonnegative integers with z > 0.

Original entry on oeis.org

1, 3, 2, 1, 4, 5, 1, 3, 5, 5, 4, 2, 4, 7, 2, 1, 9, 9, 4, 4, 7, 5, 1, 5, 6, 12, 7, 1, 10, 9, 2, 3, 10, 9, 7, 5, 4, 11, 3, 5, 14, 10, 4, 4, 10, 9, 3, 2, 8, 17, 10, 4, 11, 18, 6, 7, 9, 6, 11, 2, 10, 15, 4, 1, 15, 17, 4, 9, 13, 10
Offset: 1

Views

Author

Zhi-Wei Sun, May 01 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*m (k = 0,1,2,... and m = 1, 7, 23, 647, 863).
(ii) For each triple (a,b,c) = (1,8,20), (3,5,15), (6,14,4), (7,29,5), (18,38,18), (39,81,51), (42,98,14), any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x*y*(a*x^2+b*y^2+c*z^2) is a square.
For more refinements of Lagrange's four-square theorem, see arXiv:1604.06723.

Examples

			a(4) = 1 since 4 = 0^2 + 0^2 + 2^2 + 0^2 with 2 > 0 and (5*0^2+7*0^2+9*2^2)*0*2 = 0^2.
a(7) = 1 since 7 = 2^2 + 1^2 + 1^2 + 1^2 with 1 > 0 and (5*2^2+7*1^2+9*1^2)*1*1 = 6^2.
a(23) = 1 since 23 = 2^2 + 1^2 + 3^2 + 3^2 with 3 > 0 and (5*2^2+7*1^2+9*3^2)*1*3 = 18^2.
a(647) = 1 since 647 = 13^2 + 1^2 + 6^2 + 21^2 with 6 > 0 and (5*13^2+7*1^2+9*6^2)*1*6 = 84^2.
a(863) = 1 since 863 = 1^2 + 23^2 + 18^2 + 3^2 with 18 > 0 and (5*1^2+7*23^2+9*18^2)*23*18 = 1656^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[y*z(5x^2+7y^2+9z^2)],r=r+1],{x,0,Sqrt[n-1]},{y,0,Sqrt[n-1-x^2]},{z,1,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,70}]

A268197 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with w*(25*w + 24*x + 48*y + 96*z) a square, where w is a positive integer and x,y,z are nonnegative integers.

Original entry on oeis.org

1, 2, 1, 1, 2, 2, 1, 2, 3, 2, 2, 3, 3, 3, 1, 1, 4, 5, 2, 2, 3, 4, 1, 2, 2, 4, 8, 3, 4, 4, 1, 2, 5, 1, 5, 4, 2, 7, 3, 2, 6, 7, 1, 4, 7, 7, 3, 3, 8, 5, 4, 5, 6, 6, 1, 3, 8, 3, 6, 3, 2, 8, 5, 1, 5, 6, 5, 7, 6, 6
Offset: 1

Views

Author

Zhi-Wei Sun, May 04 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 3, 7, 15, 23, 43, 55, 463, 4^k*m (k = 0,1,2,... and m = 1, 31, 34).
(ii) For each triple (a,b,c) = (1,3,4), (2,3,4), (2,4,6), any positive integer can be written as w^2 + x^2 + y^2 + z^2 with w*(25*w + 24*(a*x+b*y+c*z)) a square, where w is a positive integer and x,y,z are nonnegative integers.
For more refinements of Lagrange's four-square theorem, see arXiv:1604.06723.

Examples

			a(1) = 1 since 1 = 1^2 + 0^2 + 0^2 + 0^2 with 1 > 0 and 1*(25*1 + 24*0 + 48*0 + 96*0) = 5^2.
a(2) = 2 since 2 = 1^2 + 0^2 + 0^2 + 1^2 with 1 > 0 and 1*(25*1 + 24*0 + 48*0 + 96*1) = 11^2, and also 2 = 1^2 + 1^2 + 0^2 + 0^2 with 1 > 0 and 1*(25*1 + 24*1 + 48*0 + 96*0) = 7^2.
a(3) = 1 since 3 = 1^2 + 0^2 + 1^2 + 1^2 with 1 > 0 and 1*(25*1 + 24*0 + 48*1 + 96*1) = 13^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 > 0 and 1*(25*1 + 24*1 + 48*1 + 96*2) = 17^2.
a(15) = 1 since 15 = 1^2 + 3^2 + 2^2 + 1^2 with 1 > 0 and 1*(25*1 + 24*3 + 48*2 + 96*1) = 17^2.
a(23) = 1 since 23 = 3^2 + 2^2 + 3^2 + 1^2 with 3 > 0 and 3*(25*3 + 24*2 + 48*3 + 96*1) = 33^2.
a(31) = 1 since 31 = 1^2 + 1^2 + 2^2 + 5^2 with 1 > 0 and 1*(25*1 + 24*1 + 48*2 + 96*5) = 25^2.
a(34) = 1 since 34 = 1^2 + 1^2 + 4^2 + 4^2 with 1 > 0 and 1*(25*1 + 24*1 + 48*4 + 96*4) = 25^2.
a(43) = 1 since 43 = 3^2 + 3^2 + 3^2 + 4^2 with 3 > 0 and 3*(25*3 + 24*3 + 48*3 + 96*4) = 45^2.
a(55) = 1 since 55 = 3^2 + 1^2 + 6^2 + 3^2 with 3 > 0 and 3*(25*3 + 24*1 + 48*6 + 96*3) = 45^2.
a(463) = 1 since 463 = 3^2 + 18^2 + 11^2 + 3^2 with 3 > 0 and 3*(25*3 + 24*18 + 48*11 + 96*3) = 63^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[25x^2+24x(y+2z+4*Sqrt[n-x^2-y^2-z^2])],r=r+1],{x,1,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,70}]

A270073 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x*y + 2*z*w a square, where x,y,z are nonnegative integers and w is an integer with x <= y and z >= |w|.

Original entry on oeis.org

1, 2, 2, 1, 2, 3, 2, 2, 2, 4, 3, 1, 2, 3, 1, 1, 2, 4, 4, 2, 4, 4, 2, 1, 2, 5, 4, 3, 2, 3, 3, 2, 2, 4, 3, 1, 4, 4, 3, 4, 3, 4, 3, 1, 2, 7, 2, 3, 2, 4, 5, 2, 4, 4, 6, 4, 1, 3, 2, 2, 3, 6, 1, 4, 2, 8, 4, 1, 5, 7, 4, 3, 4, 7, 3, 4, 2, 3, 2, 1, 4
Offset: 0

Views

Author

Zhi-Wei Sun, May 07 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 3, 11, 15, 23, 43, 67, 79, 155, 211, 331, 347, 403, 427, 659, 899, 1443, 1955, 2^k*m (k = 0,1,2,... and m = 14, 35, 62, 158, 382).
(ii) Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x*y + z*w/2 a square, where x,y,z are nonnegative integers and w is an integer with 2 | z*w and x <= y >= |w| <= z.
We have verified that a(n) > 0 for all n = 0,...,10^5.
For more refinements of Lagrange's four-square theorem, see arXiv:1604.06723.

Examples

			a(3) = 1 since 3 = 1^2 + 1^2 + 1^2 + 0^2 with 1 = 1, 1 > 0 and 1*1 + 2*1*0 = 1^2.
a(11) = 1 since 11 = 1^2 + 1^2 + 3^2 + 0^2 with 1 = 1, 3 > 0 and 1*1 + 2*3*0 = 1^2.
a(14) = 1 since 14 = 0^2 + 3^2 + 2^2 + 1^2 with 0 < 3, 2 > 1 and 0*3 + 2*2*1 = 2^2.
a(15) = 1 since 15 = 2^2 + 3^2 + 1^2 + (-1)^2 with 2 < 3, 1 = |-1| and 2*3 + 2*1*(-1) = 2^2.
a(23) = 1 since 23 = 2^2 + 3^2 + 3^2 + (-1)^2 with 2 < 3, 3 > |-1| and 2*3 + 2*3*(-1) = 0^2.
a(35) = 1 since 35 = 3^2 + 3^2 + 4^2 + (-1)^2 with 3 = 3, 4 > |-1| and 3*3 + 2*4*(-1) = 1^2.
a(43) = 1 since 43 = 3^2 + 3^2 + 5^2 + 0^2 with 3 = 3, 5 > 0 and 3*3 + 2*5*0 = 3^2.
a(62) = 1 since 62 = 3^2 + 4^2 + 6^2 + (-1)^2 with 3 < 4, 6 > |-1| and 3*4 + 2*6*(-1) = 0^2.
a(67) = 1 since 67 = 3^2 + 3^2 + 7^2 + 0^2 with 3 = 3, 7 > 0 and 3*3 + 2*7*0 = 3^2.
a(79) = 1 since 79 = 2^2 + 7^2 + 5^2 + (-1)^2 with 2 < 7, 5 > |-1| and 2*7 + 2*5*(-1) = 2^2.
a(155) = 1 since 155 = 3^2 + 11^2 + 4^2 + (-3)^2 with 3 < 11, 4 > |-3| and 3*11 + 2*4*(-3) = 3^2.
a(158) = 1 since 158 = 1^2 + 12^2 + 3^2 + (-2)^2 with 1 < 12, 3 > |-2| and 1*12 + 2*3*(-2) = 0^2.
a(211) = 1 since 211 = 9^2 + 9^2 + 7^2 + 0^2 with 9 = 9, 7 > 0 and 9*9 + 2*7*0 = 9^2.
a(331) = 1 since 331 = 9^2 + 9^2 + 13^2 + 0^2 with 9 = 9, 13 > 0 and 9*9 + 2*13*0 = 9^2.
a(347) = 1 since 347 = 13^2 + 13^2 + 3^2 + 0^2 with 13 = 13, 3 > 0 and 13*13 + 2*3*0 = 13^2.
a(382) = 1 since 382 = 5^2 + 16^2 + 10^2 + 1^2 with 5 < 16, 10 > 1 and 5*16 + 2*10*1 = 10^2.
a(403) = 1 since 403 = 13^2 + 13^2 + 7^2 + 4^2 with 13 = 13, 7 > 4 and 13*13 + 2*7*4 = 15^2.
a(427) = 1 since 427 = 11^2 + 11^2 + 13^2 + 4^2 with 11 = 11, 13 > 4 and 11*11 + 2*13*4 = 15^2.
a(659) = 1 since 659 = 17^2 + 17^2 + 9^2 + 0^2 with 17 = 17, 9 > 0 and 17*17 + 2*9*0 = 17^2.
a(899) = 1 since 899 = 7^2 + 15^2 + 24^2 + 7^2 with 7 < 15, 24 > 7 and 7*15 + 2*24*7 = 21^2.
a(1443) = 1 since 1443 = 7^2 + 31^2 + 17^2 + 12^2 with 7 < 31, 17 > 12 and 7*31 + 2*17*12 = 25^2.
a(1955) = 1 since 1955 = 19^2 + 27^2 + 28^2 + (-9)^2 with 19 < 27, 28 > |-9| and 19*27 + 2*28*(-9) = 3^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&SQ[x*y+2*z*Sqrt[n-x^2-y^2-z^2]], r=r+1], {x, 0, Sqrt[n/2]}, {y, x, Sqrt[n-x^2]},{z, Ceiling[-Sqrt[(n-x^2-y^2)/2]], Sqrt[(n-x^2-y^2)/2]}]; Print[n, " ", r]; Continue, {n, 0, 80}]

Extensions

All statements in the examples checked by Rick L. Shepherd, May 27 2016

A272888 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with w*(x^2 + 8*y^2 - z^2) a square, where w,x,y are nonnegative integers and z is a positive integer.

Original entry on oeis.org

1, 2, 2, 1, 4, 5, 1, 2, 5, 5, 4, 4, 5, 8, 2, 2, 8, 6, 4, 6, 9, 5, 3, 4, 5, 12, 9, 1, 11, 8, 4, 2, 8, 9, 8, 7, 6, 12, 1, 5, 14, 10, 4, 8, 15, 9, 3, 4, 8, 14, 11, 5, 11, 16, 2, 6, 11, 6, 11, 4, 13, 13, 1, 1, 16, 17, 6, 9, 13, 9, 5, 7, 9, 19, 12, 6, 17, 8, 4, 6
Offset: 1

Views

Author

Zhi-Wei Sun, May 08 2016

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 7, 39, 63, 87, 5116, 2^(4k+2)*m (k = 0,1,2,... and m = 1, 7).
See arXiv:1604.06723 for more refinements of Lagrange's four-square theorem.

Examples

			a(1) = 1 since 1 = 0^2 + 0^2 + 0^2 + 1^2 with 1 > 0 and 0*(0^2 + 8*0^2 - 1^2) = 0^2.
a(4) = 1 since 4 = 0^2 + 0^2 + 0^2 + 2^2 with 2 > 0 and 0*(0^2 + 8*0^2 - 2^2) = 0^2.
a(7) = 1 since 7 = 2^2 + 1^2 + 1^2 + 1^2 with 1 > 0 and 2*(1^2 + 8*1^2 - 1^2) = 4^2.
a(28) = 1 since 28 = 2^2 + 2^2 + 4^2 + 2^2 with 2 > 0 and 2*(2^2 + 8*4^2 - 2^2) = 16^2.
a(39) = 1 since 39 = 1^2 + 3^2 + 2^2 + 5^2 with 5 > 0 and 1*(3^2 + 8*2^2 - 5^2) = 4^2.
a(63) = 1 since 63 = 2^2 + 5^2 + 3^2 + 5^2 with 5 > 0 and 2*(5^2 + 8*3^2 - 5^2) = 12^2.
a(87) = 1 since 87 = 2^2 + 1^2 + 9^2 + 1^2 with 1 > 0 and 2*(1^2 + 8*9^2 - 1^2) = 36^2.
a(5116) = 1 since 5116 = 65^2 + 9^2 + 9^2 + 27^2 with 27 > 0 and 65*(9^2 + 8*9^2 - 27^2) = 0^2.
		

Crossrefs

Programs

  • Maple
    N:= 1000; # to get a(1)..a(N)
    A:= Vector(N):
    for z from 1 to floor(sqrt(N)) do
      for x from 0 to floor(sqrt(N-z^2)) do
        for y from 0 to floor(sqrt(N-z^2-x^2)) do
          q:= x^2 + 8*y^2 - z^2;
          if q < 0 then
            A[x^2+y^2+z^2]:= A[x^2+y^2+z^2]+1
          elif q = 0 then
            for w from 0 to floor(sqrt(N-z^2-x^2-y^2)) do
               m:= w^2 + x^2 + y^2 + z^2;
               A[m]:= A[m]+1;
            od
          else
            wm:= mul(`if`(t[2]::odd, t[1], 1), t=isqrfree(q)[2]);
            for j from 0 to floor((N-z^2-x^2-y^2)^(1/4)/sqrt(wm)) do
               m:= (wm*j^2)^2 + x^2 + y^2 + z^2;
               A[m]:= A[m]+1;
            od;
          fi
        od
      od
    od:
    convert(A,list); # Robert Israel, May 27 2016
  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[Sqrt[n-x^2-y^2-z^2](x^2+8y^2-z^2)],r=r+1],{x,0,Sqrt[n-1]},{y,0,Sqrt[n-1-x^2]},{z,1,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,80}]

Extensions

Rick L. Shepherd, May 27 2016: I checked all the statements in each example.

A272977 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with 3*x^2*y + z^2*w a square, where w is a nonzero integer and x,y,z are nonnegative integers with x >= z.

Original entry on oeis.org

2, 4, 1, 3, 8, 1, 1, 4, 3, 11, 3, 1, 9, 5, 3, 3, 10, 7, 6, 9, 3, 6, 1, 1, 11, 15, 4, 2, 13, 2, 2, 4, 4, 16, 5, 4, 13, 5, 2, 10, 12, 6, 5, 1, 12, 6, 1, 3, 7, 19, 2, 10, 10, 6, 3, 1, 2, 12, 7, 3, 15, 7, 4, 3, 16, 8, 6, 9, 5, 6, 1, 7, 12, 19, 3, 3, 7, 2, 4, 9
Offset: 1

Views

Author

Zhi-Wei Sun, May 11 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 3, 7, 23, 47, 71, 147, 199, 263, 439, 16^k*m (k = 0,1,2,... and m = 6, 12, 24, 44, 56, 140, 156, 174, 204, 284, 4652).
(ii) For each ordered pair (a,b) = (7,1), (8,1), (9,2), any positive integer can be written as x^2 + y^2 + z^2 + w^2 with a*x^2*y + b*z^2*w a square, where x,y,z are nonnegative integers and w is a nonzero integer.
Compare this conjecture with the one in A270073.
See arXiv:1604.06723 for more refinements of Lagrange's four-square theorem.

Examples

			a(1) = 2 since 1 = 1^2 + 0^2 + 0^2 + 1^2 with 1 > 0 and 3*1^2*0 + 0^2*1 = 0^2, and also 1 = 1^2 + 0^2 + 0^2 + (-1)^2 with 1 > 0 and 3*1^2*0 + 0^2*(-1) = 0^2.
a(3) = 1 since 3 = 1^2 + 0^2 + 1^2 + 1^2 with 1 = 1 and 3*1^2*0 + 1^2*1 = 1^2.
a(6) = 1 since 6 = 2^2 + 0^2 + 1^2 + 1^2 with 2 > 1 and 3*2^2*0 + 1^2*1 = 1^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + (-2)^2 with 1 = 1 and 3*1^2*1 + 1^2*(-2) = 1^2.
a(12) = 1 since 12 = 1^2 + 1^2 + 1^2 + (-3)^2 with 1 = 1 and 3*1^2*1 + 1*(-3) = 0^2.
a(23) = 1 since 23 = 3^2 + 1^2 + 3^2 + (-2)^2 with 3 = 3 and 3*3^2*1 + 3^2*(-2) = 3^2.
a(24) = 1 since 24 = 2^2 + 0^2 + 2^2 + 4^2 with 2 = 2 and 3*2^2*0 + 2^2*4 = 4^2.
a(44) = 1 since 44 = 3^2 + 5^2 + 3^2 + 1^2 with 3 = 3 and 3*3^2*5 + 3^2*1 = 12^2.
a(47) = 1 since 47 = 3^2 + 2^2 + 3^2 + (-5)^2 with 3 = 3 and 3*3^2*2 + 3^2*(-5) = 3^2.
a(56) = 1 since 56 = 6^2 + 0^2 + 2^2 + 4^2 with 6 > 2 and 3*6^2*0 + 2^2*4 = 4^2.
a(71) = 1 since 71 = 5^2 + 6^2 + 3^2 + (-1)^2 with 5 > 3 and 3*5^2*6 + 3^2*(-1) = 21^2.
a(140) = 1 since 140 = 5^2 + 3^2 + 5^2 + (-9)^2 with 5 = 5 and 3*5^2*3 + 5^2*(-9) = 0^2.
a(147) = 1 since 147 = 11^2 + 0^2 + 5^2 + 1^2 with 11 > 5 and 3*11^2*0 + 5^2*1 = 5^2.
a(156) = 1 since 156 = 7^2 + 3^2 + 7^2 + 7^2 with 7 = 7 and 3*7^2*3 + 7^2*7 = 28^2.
a(174) = 1 since 174 = 13^2 + 0^2 + 2^2 + 1^2 with 13 > 2 and 3*13^2*0 + 2^2*1 = 2^2.
a(199) = 1 since 199 = 9^2 + 1^2 + 9^2 + 6^2 with 9 = 9 and 3*9^2*1 + 9^2*6 = 27^2.
a(204) = 1 since 204 = 1^2 + 9^2 + 1^2 + (-11)^2 with 1 = 1 and 3*1^2*9 + 1^2*(-11) = 4^2.
a(263) = 1 since 263 = 3^2 + 14^2 + 3^2 + 7^2 with 3 = 3 and
3*3^2*14 + 3^2*7 = 21^2.
a(284) = 1 since 284 = 13^2 + 3^2 + 5^2 + (-9)^2 with 13 > 5 and 3*13^2*3 + 5^2*(-9) = 36^2.
a(439) = 1 since 439 = 13^2 + 5^2 + 7^2 + (-14)^2 with 13 > 7 and 3*13^2*5 + 7^2*(-14) = 43^2.
a(4652) = 1 since 4652 = 11^2 + 21^2 + 11^2 + (-63)^2 with 11 = 11 and 3*11^2*21 + 11^2*(-63) = 0^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&SQ[3x^2*y+z^2*(-1)^k*Sqrt[n-x^2-y^2-z^2]],r=r+1], {z,0,Sqrt[(n-1)/2]},{x,z,Sqrt[n-1-z^2]},{y,0,Sqrt[n-1-x^2-z^2]},{k,0,1}];Print[n, " ",r]; Continue, {n,1,80}]

A273021 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with 2*x*y + y*z - z*w - w*x a square, where w is a positive integer and x,y,z are nonnegative integers with x <= y.

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 2, 1, 2, 2, 1, 3, 3, 4, 2, 2, 3, 5, 2, 2, 4, 1, 1, 3, 3, 4, 7, 4, 4, 1, 1, 1, 4, 4, 2, 4, 4, 6, 5, 2, 5, 7, 3, 3, 3, 4, 1, 3, 5, 4, 5, 6, 2, 8, 1, 4, 4, 4, 3, 2, 5, 5, 4, 2, 5, 7, 2, 3, 4, 5, 1, 5, 4, 5, 6, 5, 3, 4, 3, 2
Offset: 1

Views

Author

Zhi-Wei Sun, May 13 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 11, 31, 47, 55, 71, 105, 115, 119, 253, 383, 385, 4^k*m (k = 0,1,2,... and m = 2, 22, 23, 30, 330).
(ii) Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with (x+y)*(z+w) a square, where w is an integer and x,y,z are nonnegative integers with x <= y >= z >= |w|.
See arXiv:1604.06723 for more conjectural refinements of Lagrange's four-square theorem.

Examples

			a(1) = 1 since 1 = 0^2 + 0^2 + 0^2 + 1^2 with 0 = 0 and 2*0*0 + 0*0 - 0*1 - 1*0 = 0^2.
a(2) = 1 since 2 = 0^2 + 1^2 + 0^2 + 1^2 with 0 < 1 and 2*0*1 + 1*0 - 0*1 - 1*0 = 0^2.
a(11) = 1 since 11 = 0^2 + 1^2 + 3^2 + 1^2 with 0 < 1 and 2*0*1 + 1*3 - 3*1 - 1*0 = 0^2.
a(22) = 1 since 22 = 0^2 + 3^2 + 2^2 + 3^2 with 0 < 3 and 2*0*3 + 3*2 - 2*3 - 3*0 = 0^2.
a(23) = 1 since 23 = 2^2 + 3^2 + 3^2 + 1^2 with 2 < 3 and 2*2*3 + 3*3 - 3*1 - 1*2 = 4^2.
a(30) = 1 since 30 = 1^2 + 3^2 + 2^2 + 4^2 with 1 < 3 and 2*1*3 + 3*2 - 2*4 - 4*1 = 0^2.
a(31) = 1 since 31 = 3^2 + 3^2 + 2^2 + 3^2 with 3 = 3 and
2*3*3 + 3*2 - 2*3 -3*3 = 3^2.
a(47) = 1 since 47 = 3^2 + 5^2 + 2^2 + 3^2 with 3 < 5 and 2*3*5 + 5*2 - 2*3 - 3*3 = 5^2.
a(55) = 1 since 55 = 1^2 + 7^2 + 2^2 + 1^2 with 1 < 7 and 2*1*7 + 7*2 - 2*1 - 1*1 = 5^2.
a(71) = 1 since 71 = 1^2 + 5^2 + 3^2 + 6^2 with 1 < 5 and 2*1*5 + 5*3 - 3*6 - 6*1 = 1^2.
a(105) = 1 since 105 = 1^2 + 6^2 + 2^2 + 8^2 with 1 < 6 and 2*1*6 + 6*2 - 2*8 - 8*1 = 0^2.
a(115) = 1 since 115 = 1^2 + 8^2 + 7^2 + 1^2 with 1 < 8 and 2*1*8 + 8*7 - 7*1 - 1*1 = 8^2.
a(119) = 1 since 119 = 1^2 + 6^2 + 1^2 + 9^2 with 1 < 6 and 2*1*6 + 6*1 - 1*9 - 9*1 = 0^2.
a(253) = 1 since 253 = 2^2 + 8^2 + 11^2 + 8^2 with 2 < 8 and 2*2*8 + 8*11 - 11*8 - 8*2 = 4^2.
a(330) = 1 since 330 = 4^2 + 13^2 + 8^2 + 9^2 with 4 < 13 and 2*4*13 + 13*8 - 8*9 - 9*4 = 10^2.
a(383) = 1 since 383 = 9^2 + 14^2 + 5^2 + 9^2 with 9 < 14 and 2*9*14 + 14*5 - 5*9 - 9*9 = 14^2.
a(385) = 1 since 385 = 4^2 + 12^2 + 0^2 + 15^2 with 4 < 12 and 2*4*12 + 12*0 - 0*15 - 15*4 = 6^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[y*(2x+z)-Sqrt[n-x^2-y^2-z^2]*(x+z)],r=r+1],{x,0,Sqrt[(n-1)/2]},{y,x,Sqrt[n-1-x^2]},{z,0,Sqrt[n-1-x^2-y^2]}];Print[n," ",r];Continue,{n,1,80}]

A273108 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (x + y)^2 + (4z)^2 a square, where x,y,z,w are nonnegative integers with x <= y > z.

Original entry on oeis.org

1, 2, 1, 1, 3, 3, 1, 2, 3, 5, 3, 1, 3, 4, 1, 1, 5, 4, 3, 3, 3, 4, 1, 3, 5, 9, 4, 1, 6, 5, 3, 2, 5, 7, 6, 3, 3, 7, 1, 5, 9, 5, 3, 3, 6, 5, 1, 1, 6, 10, 6, 3, 6, 9, 3, 4, 4, 5, 8, 1, 6, 8, 2, 1, 10, 10, 2, 5, 6, 6, 2, 4, 6, 11, 7, 3, 6, 5, 2, 3
Offset: 1

Views

Author

Zhi-Wei Sun, May 15 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 39, 47, 95, 543, 4^k*m (k = 0,1,2,... and m = 1, 3, 7, 15, 23, 135, 183).
(ii) Any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that (a*x+b*y)^2 + (c*z)^2 is a square, whenever (a,b,c) is among the triples (1,2,4), (1,2,12), (1,4,8), (1,4,12), (1,10,20), (1,15,12), (2,7,20), (2,7,60), (2,21,60), (3,3,4), (3,3,40), (3,4,12), (3,5,60), (3,6,20), (3,9,20), (3,11,24), (3,12,8), (3,27,20), (3,27,56), (3,29,60), (3,30,28), (3,45,20), (4,4,3), (4,4,5), (4,4,9), (4,4,15), (4,8,5), (4,12,15), (4,12,21), (4,12,45), (4,16,45), (4,19,40), (4,20,21), (4,36,21), (4,36,33), (4,52,63), (5,5,8), (5,5,12), (5,5,24), (5,6,12), (5,8,24), (5,10,4), (5,15,24), (5,25,16), (5,30,12), (5,35,48), (5,40,24), (6,10,15), (6,15,28), (6,45,28), (7,7,20), (7,7,24), (7,21,12), (7,63,36), (8,8,15), (8,12,45), (8,16,35), (8,16,45), (8,32,15), (8,32,21), (8,48,45), (9,9,40), (9,18,28), (9,27,16), (9,45,20), (10,15,12), (10,25,28), (11,11,60), (12,12,5), (12,12,35), (12,20,63), (12,60,55).
See also A271714, A273107, A273110 and A273134 for similar conjectures related to Pythagorean triples. For more conjectural refinements of Lagrange's four-square theorem, one may consult arXiv:1604.06723.

Examples

			a(1) = 1 since 1 = 0^2 + 1^2 + 0^2 + 0^2 with 0 < 1 > 0 and (0+1)^2 + (4*0)^2 = 1^2.
a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 1 = 1 > 0 and (1+1)^2 + (4*0)^2 = 2^2.
a(7) = 1 since 7 = 1^2 + 2^2 + 1^2 + 1^2 with 1 < 2 > 1 and (1+2)^2 + (4*1)^2 = 5^2.
a(15) = 1 since 15 = 1^2 + 2^2 + 1^2 + 3^2 with 1 < 2 > 1 and (1+2)^2 + (4*1)^2 = 5^2.
a(23) = 1 since 23 = 3^2 + 3^2 + 2^2 + 1^2 with 3 = 3 > 2 and (3+3)^2 + (4*2)^2 = 10^2.
a(39) = 1 since 39 = 1^2 + 5^2 + 2^2 + 3^2 with 1 < 5 > 2 and (1+5)^2 + (4*2)^2 = 10^2.
a(47) = 1 since 47 = 3^2 + 3^2 + 2^2 + 5^2 with 3 = 3 > 2 and (3+3)^2 + (4*2)^2 = 10^2.
a(95) = 1 since 95 = 3^2 + 7^2 + 6^2 + 1^2 with 3 < 7 > 6 and (3+7)^2 + (4*6)^2 = 26^2.
a(135) = 1 since 135 = 3^2 + 6^2 + 3^2 + 9^2 with 3 < 6 > 3 and (3+6)^2 + (4*3)^2 = 15^2.
a(183) = 1 since 183 = 2^2 + 7^2 + 3^2 + 11^2 with 2 < 7 > 3 and (2+7)^2 + (4*3)^2 = 15^2.
a(543) = 1 since 543 = 2^2 + 13^2 + 9^2 + 17^2 with 2 < 13 > 9 and (2+13)^2 + (4*9)^2 = 39^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[(x+y)^2+16*z^2],r=r+1],{x,0,Sqrt[n/2]},{y,x,Sqrt[n-x^2]},{z,0,Min[y-1,Sqrt[n-x^2-y^2]]}];Print[n," ",r];Continue,{n,1,80}]

Extensions

All statements in examples checked by Rick L. Shepherd, May 29 2016

A273107 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (8*x+12*y)^2 + (15*z)^2 a square, where x,y,z,w are nonnegative integers with x+y > 0 and z > 0.

Original entry on oeis.org

0, 1, 2, 1, 0, 1, 1, 1, 1, 1, 3, 4, 2, 3, 2, 1, 2, 3, 3, 1, 2, 3, 1, 1, 1, 1, 4, 3, 3, 4, 1, 1, 5, 3, 2, 3, 3, 5, 2, 1, 2, 1, 3, 3, 3, 3, 2, 4, 5, 5, 2, 4, 5, 6, 1, 3, 7, 3, 5, 4, 2, 6, 4, 1, 5, 4, 5, 4, 7, 7, 4, 3, 5, 4, 5, 6, 2, 10, 3, 1
Offset: 1

Views

Author

Zhi-Wei Sun, May 15 2016

Keywords

Comments

Conjecture: a(n) > 0 for all n > 5, and a(n) = 1 only for n = 7, 9, 23, 25, 31, 55, 2^k*m (k = 1,2,... and m = 1, 5), 2^(2k+1)*m (k = 0,1,2,... and m = 3, 13, 21).
This conjecture implies that any integer n > 5 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 8*x+12*y and 15*z are the two legs of a right triangle with positive integer sides.
See also A271714, A273108, A273110 and A273134 for similar conjectures related to Pythagorean triples. For more conjectural refinements of Lagrange's four-square theorem, one may consult arXiv:1604.06723.

Examples

			a(2) = 1 since 2 = 1^2 + 0^2 + 1^2 + 0^2 with 1 + 0 > 0 < 1 and (8*1+12*0)^2 + (15*1)^2 = 17^2.
a(4) = 1 since 4 = 1^2 + 1^2 + 1^2 + 1^2 with 1 + 1 > 0 < 1 and (8*1+12*1)^2 + (15*1)^2 = 25^2.
a(6) = 1 since 6 = 1^2 + 0^2 + 1^2 + 2^2 with 1 + 0 > 0 < 1 and (8*1+12*0)^2 + (15*1)^2 = 17^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 + 1 > 0 < 1 and (8*1+12*1)^2 + (15*1)^2 = 25^2.
a(9) = 1 since 9 = 2^2 + 0^2 + 2^2 + 1^2 with 2 + 0 > 0 < 2 and (8*2+12*0)^2 + (15*2)^2 = 34^2.
a(10) = 1 since 10 = 0^2 + 3^2 + 1^2 + 0^2 with 0 + 3 > 0 < 1 and (8*0+12*3)^2 + (15*1)^2 = 39^2.
a(20) = 1 since 20 = 3^2 + 1^2 + 1^2 + 3^2 with 3 + 1 > 0 < 1 and (8*3+12*1)^2 + (15*1)^2 = 39^2.
a(23) = 1 since 23 = 2^2 + 1^2 + 3^2 + 3^2 with 2 + 1 > 0 < 3 and (8*2+12*1)^2 + (15*3)^2 = 53^2.
a(25) = 1 since 25 = 1^2 + 2^2 + 4^2 + 2^2 with 1 + 2 > 0 < 4 and (8*1+12*2)^2 + (15*4)^2 = 68^2.
a(26) = 1 since 26 = 0^2 + 3^2 + 1^2 + 4^2 with 0 + 3 > 0 < 1 and (8*0+12*3)^2 + (15*1)^2 = 39^2.
a(31) = 1 since 31 = 3^2 + 3^2 + 3^2 + 2^2 with 3 + 3 > 0 < 3 and (8*3+12*3)^2 + (15*3)^2 = 75^2.
a(42) = 1 since 42 = 2^2 + 2^2 + 5^2 + 3^2 with 2 + 2 > 0 < 5 and (8*2+12*2)^2 + (15*5)^2 = 85^2.
a(55) = 1 since 55 = 6^2 + 1^2 + 3^2 + 3^2 with 6 + 1 > 0 < 3 and (8*6+12*1)^2 + (15*3)^2 = 75^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[(8x+12y)^2+(15z)^2],r=r+1],{x,0,Sqrt[n-1]},{y,Max[0,1-x],Sqrt[n-1-x^2]},{z,1,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,80}]

A273110 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (x+4*y+4*z)^2 + (9*x+3*y+3*z)^2 a square, where x,y,z,w are nonnegative integers with y > 0 and y >= z <= w.

Original entry on oeis.org

1, 2, 2, 1, 2, 3, 1, 2, 3, 3, 3, 2, 2, 2, 2, 1, 5, 6, 2, 2, 2, 3, 1, 3, 3, 4, 6, 1, 4, 4, 1, 2, 6, 5, 3, 3, 2, 5, 1, 3, 6, 5, 4, 3, 4, 3, 1, 2, 4, 7, 7, 2, 4, 8, 1, 2, 6, 3, 4, 2, 4, 5, 4, 1, 7, 8, 4, 5, 4, 4, 1, 6, 5, 7, 5, 2, 4, 5, 1, 2
Offset: 1

Views

Author

Zhi-Wei Sun, May 15 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*m (k = 0,1,2,... and m = 1, 7, 23, 31, 39, 47, 55, 71, 79, 119, 151, 191, 311, 671).
(ii) Any natural number can be written as x^2 + y^2 + z^2 + w^2 with (x+y+z)^2 + (4*(x+y-z))^2 a square, where x,y,z,w are nonnegative integers with x+y >= z.
(iii) For each tuple (a,b,c,d,e,f) = (1,1,1,3,6,-3), (1,1,1,4,12,-12), (1,1,2,1,1,-5), (1,1,2,1,8,-5), (1,1,2,3,3,-3), (1,1,2,4,4,-8), (1,3,11,12,4,4), (1,3,14,16,4,4), (1,3,14,18,4,2), (1,3,20,16,4,12), (1,4,11,6,3,3), (1,5,13,12,12,12), (1,5,14,15,12,21), (1,6,6,16,8,8), (1,6,14,12,8,8), (1,6,14,16,8,4), (1,6,17,20,8,4), (1,6,20,20,8,8), (1,7,8,4,2,6), (1,7,8,10,5,15), (1,7,9,10,5,12), (1,7,15,4,2,8), (1,7,15,10,5,20), any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that (a*x+b*y+c*z)^2 + (d*x+e*y+f*z)^2 is a square.
It was proved in arXiv:1604.06723 that any positive integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and y > 0 such that x+4*y+4*z and 9*x+3*y+3*z are the two legs of a right triangle with positive integer sides.
See also A271714, A273107, A273108 and A273134 for similar conjectures related to Pythagorean triples. For more conjectural refinements of Lagrange's four-square theorem, one may consult arXiv:1604.06723.

Examples

			a(1) = 1 since 1 = 0^2 + 1^2 + 0^2 + 0^2 with 1 > 0 = 0 and (0+4*1+4*0)^2 + (9*0+3*1+3*0)^2 = 5^2.
a(7) = 1 since 7 = 2^2 + 1^2 + 1^2 + 1^2 with 0 < 1 = 1 = 1 and (2+4*1+4*1)^2 + (9*2+3*1+3*1)^2 = 26^2.
a(23) = 1 since 23 = 3^2 + 2^2 + 1^2 + 3^2 with 2 > 1 < 3 and (3+4*2+4*1)^2 + (9*3+3*2+3*1)^2 = 39^2.
a(31) = 1 since 31 = 2^2 + 1^2 + 1^2 + 5^2 with 0 < 1 = 1 < 5 and (2+4*1+4*1)^2 + (9*2+3*1+3*1)^2 = 26^2.
a(39) = 1 since 39 = 3^2 + 2^2 + 1^2 + 5^2 with 2 > 1 < 5 and (3+4*2+4*1)^2 + (9*3+3*2+3*1)^2 = 39^2.
a(47) = 1 since 47 = 5^2 + 3^2 + 2^2 + 3^2 with 3 > 2 < 3 and (5+4*3+4*2)^2 + (9*5+3*3+3*2)^2 = 65^2.
a(55) = 1 since 55 = 2^2 + 1^2 + 1^2 + 7^2 with 0 < 1 = 1 < 7 and (2+4*1+4*1)^2 + (9*2+3*1+3*1)^2 = 26^2.
a(71) = 1 since 71 = 6^2 + 5^2 + 1^2 + 3^2 with 5 > 1 < 3 and (6+4*5+4*1)^2 + (9*6+3*5+3*1)^2 = 78^2.
a(79) = 1 since 79 = 6^2 + 3^2 + 3^2 + 5^2 with 0 < 3 = 3 < 5 and (6+4*3+4*3)^2 + (9*6+3*3+3*3)^2 = 78^2.
a(119) = 1 since 119 = 5^2 + 3^2 + 2^2 + 9^2 with 3 > 2 < 9 and (5+4*3+4*2)^2 + (9*5+3*3+3*2)^2 = 65^2.
a(151) = 1 since 151 = 9^2 + 6^2 + 3^2 + 5^2 with 6 > 3 < 5 and (9+4*6+4*3)^2 + (9*9+3*6+3*3)^2 = 117^2.
a(191) = 1 since 191 = 10^2 + 9^2 + 1^2 + 3^2 with 9 > 1 < 3 and (10+4*9+4*1)^2 + (9*10+3*9+3*1)^2 = 130^2.
a(311) = 1 since 311 = 7^2 + 6^2 + 1^2 + 15^2 with 6 > 1 < 15 and (7+4*6+4*1)^2 + (9*7+3*6+3*1)^2 = 91^2.
a(671) = 1 since 671 = 17^2 + 11^2 + 6^2 + 15^2 with 11 > 6 < 15 and (17+4*11+4*6)^2 + (9*17+3*11+3*6)^2 = 221^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[(x+4y+4z)^2+(9x+3y+3z)^2],r=r+1],{x,0,Sqrt[n]},{z,0,Sqrt[(n-x^2)/3]},{y,Max[1,z],Sqrt[n-x^2-2z^2]}];Print[n," ",r];Continue,{n,1,80}]
Showing 1-10 of 22 results. Next