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.

A283196 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with 2*x + y and 2*x + z both squares, where x,y,z are integers with |y| <= |z|, and w is a positive integer.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 02 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0.
(ii) Any positive integer n can be written as x^2 + y^2 + z^2 + w^2 such that both x + y and x + 2*z are squares, where x,y,z,w are integers with x >= 0 and w > 0.
(iii) Any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with 2*x + 2*y and 2*x + z both squares, where x,y,z,w are integers with x*y <= 0.
(iv) Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with 2*|x-y| and 2*x + z both squares, where x,y,z,w are integers with x >= 0 and y >= 0.
By the linked JNT paper, any nonnegative integer n can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that 2*x + y is a square, and also we can write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x - y (or 2*x - 2*y) is a square.

Examples

			a(2) = 1 since 2 = 0^2 + 0^2 + 1^2 + 1^2 with 2*0 + 0 = 0^2 and 2*0 + 1 = 1^2.
a(14) = 1 since 14 = 2^2 + 0^2 + (-3)^2 + 1^2 with 2*2 + 0 = 2^2 and 2*2 + (-3) = 1^2.
a(59) = 1 since 59 = 3^2 + 3^2 + (-5)^2 + 4^2 with 2*3 + 3 = 3^2 and 2*3 + (-5) = 1^2.
a(88) = 1 since 88 = (-2)^2 + 4^2 + 8^2 + 2^2 with 2*(-2) + 4 = 0^2 and 2*(-2) + 8 = 2^2.
a(131) = 1 since 131 = 0^2 + 1^2 + 9^2 + 7^2 with 2*0 + 1 = 1^2 and 2*0 + 9 = 3^2.
a(219) = 1 since 219 = 8^2 + (-7)^2 + 9^2 + 5^2 with 2*8 + (-7) = 3^2 and 2*8 + 9 = 5^2.
a(249) = 1 since 249 = (-4)^2 + 8^2 + 12^2 + 5^2 with 2*(-4) + 8 = 0^2 and 2*(-4) + 12 = 2^2.
a(312) = 1 since 312 = 6^2 + 4^2 + (-8)^2 + 14^2 with 2*6 + 4 = 4^2 and 2*6 + (-8) = 2^2.
a(323) = 1 since 323 = 9^2 + 7^2 + 7^2 + 12^2 with 2*9 + 7 = 5^2.
a(536) = 1 since 536 = (-6)^2 + 12^2 + 16^2 + 10^2 with 2*(-6) + 12 = 0^2 and 2*(-6) + 16 = 2^2.
a(888) = 1 since 888 = 14^2 + 8^2 + (-12)^2 + 22^2 with 2*14 + 8 = 6^2 and 2*14 + (-12) = 4^2.
a(1464) = 1 since 1464 = 2^2 + 0^2 + (-4)^2 + 38^2 with 2*2 + 0 = 2^2 and 2*2 + (-4) = 0^2.
a(4152) = 1 since 4152 = 30^2 + 4^2 + (-56)^2 + 10^2 with 2*30 + 4 = 8^2 and 2*30 + (-56) = 2^2.
		

Crossrefs

Programs

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