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-3 of 3 results.

A283170 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x + 2*y and z + 2*w both squares, where x and w are nonnegative integers, and y and z are integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 02 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,....
(ii) Any nonnegative integer n can be written as x^2 + y^2 + z^2 + w^2 with x + 3*y and z + 3*w both squares, where x,y,z are integers and w is a nonnegative integer.
(iii) Every nonnegative integer can be expressed as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that both x + 2*y and z + 3*w are squares.
(vi) Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z nonnegative integers and w an integer such that |2*x-y| is a square and |2*z-w| is twice a square. Also, each nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z nonnegative integers and w an integer such that |2*x-y| is twice a square and |2*z-w| is a square.
(v) Every n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that |(x-2*y)*(z-2*w)| is twice a square. Also, any positive integer n can be written as x^2 + y^2 + z^2 + w^2 with x a positive integer and y,z,w nonnegative integers such that (2*x+y)*(2*z-w) is twice a square.
(vi) Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that both x + 2*y and z^2 - w^2 (or z^2 + 8*w^2, or 7*z^2 + 9*w^2) are squares.
(vii) Any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that both 2*x - y and 64*z^2 - 84*z*w + 21*w^2 (or 81*z^2 - 112*z*w + 56*w^2) are squares.
By the linked JNT paper, any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that x + 2*y is a square.

Crossrefs

Programs

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

Formula

a(3) = 1 since 3 = 1^2 + 0^2 + (-1)^2 + 1^2 with 1 + 2*0 = 1^2 and (-1)+2*1 = 1^2.
a(4) = 2 since 4 = 0^2 + 0^2 + 0^2 + 2^2 with 0 + 2*0 = 0^2 and 0 + 2*2 = 2^2, and also 4 = 0^2 + 2^2 + 0^2 + 0^2 with 0 + 2*2 = 2^2 and 0 + 2*0 = 0^2.
a(8) = 1 since 8 = 0^2 + 2^2 + 0^2 + 2^2 with 0 + 2*2 = 2^2 and 0 + 2*2 = 2^2.
a(11) = 1 since 11 = 3^2 + (-1)^2 + 1^2 + 0^2 with 3 + 2*(-1) = 1^2 and 1 + 2*0 = 1^2.
a(12) = 1 since 12 = 3^2 + (-1)^2 + (-1)^2 + 1^2 with 3 + 2*(-1) = 1^2 and (-1) + 2*1 = 1^2.
a(28) = 1 since 28 = 3^2 + (-1)^2 + 3^2 + 3^2 with 3 + 2*(-1) = 1^2 and 3 + 2*3 = 3^2.
a(40) = 1 since 40 = 4^2 + (-2)^2 + (-4)^2 + 2^2 with 4 + 2*(-2) = 0^2 and (-4) + 2*2 = 0^2.
a(41) = 1 since 41 = 6^2 + (-1)^2 + 0^2 + 2^2 with 6 + 2*(-1) = 2^2 and 0 + 2*2 = 2^2.
a(332) = 1 since 332 = 11^2 + 7^2 + (-9)^2 + 9^2 with 11 + 2*7 = 5^2 and (-9) + 2*9 = 3^2.
a(443) = 1 since 443 = 19^2 + (-9)^2 + 1^2 + 0^2 with 19 + 2*(-9) = 1^2 and 1 + 2*0 = 1^2.
a(488) = 1 since 488 = 12^2 + 2^2 + (-12)^2 + 14^2 with 12 + 2*2 = 4^2 and (-12) + 2*14 = 4^2.
a(808) = 1 since 808 = 8^2 + 14^2 + (-8)^2 + 22^2 with 8 + 2*14 = 6^2 and (-8) + 2*22 = 6^2.
a(892) = 1 since 892 = 27^2 + (-1)^2 + (-9)^2 + 9^2 with 27 + 2*(-1) = 5^2 and (-9) + 2*9 = 3^2.

A282562 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that both 2*x - y and 9*z^2 + 666*z*w + w^2 are squares.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 18 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 16^k*m (k = 0,1,2,... and m = 12, 19, 23, 44, 60, 67, 139, 140, 248, 264, 347, 427, 499, 636, 1388, 1867, 1964, 4843).
By the linked JNT paper, any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z*(z-w) = 0. Whether z = 0 or z = w, the number 9*z^2 + 666*z*w + w^2 is definitely a square.
See also A282561 for a similar conjecture.

Examples

			a(12) = 1 since 12 = 2^2 + 0^2 + 2^2 + 2^2 with 2*2 - 0 = 2^2 and 9*2^2 + 666*2*2 + 2^2 = 52^2.
a(19) = 1 since 19 = 1^2 + 1^2 + 4^2 + 1^2 with 2*1 - 1 = 1^2 and 9*4^2 + 666*4*1 + 1^2 = 53^2.
a(44) = 1 since 44 = 5^2 + 1^2 + 3^2 + 3^2 with 2*5 - 1 = 3^2 and 9*3^2 + 666*3*3 + 3^2 = 78^2.
a(60) = 1 since 60 = 3^2 + 5^2 + 1^2 + 5^2 with 2*3 - 5 = 1^2 and 9*1^2 + 666*1*5 + 5^2 = 58^2.
a(67) = 1 since 67 = 4^2 + 7^2 + 1^2 + 1^2 with 2*4 - 7 = 1^2 and 9*1^2 + 666*1*1 + 1^2 = 26^2.
a(139) = 1 since 139 = 8^2 + 7^2 + 1^2 + 5^2 with 2*8 - 7 = 3^2 and 9*1^2 + 666*1*5 + 5^2 = 58^2.
a(140) = 1 since 140 = 3^2 + 5^2 + 5^2 + 9^2 with 2*3 - 5 = 1^2 and 9*5^2 + 666*5*9 + 9^2 = 174^2.
a(264) = 1 since 264 = 8^2 + 0^2 + 10^2 + 10^2 with 2*8 - 0 = 4^2 and 9*10^2 + 666*10*10 + 10^2 = 260^2.
a(499) = 1 since 499 = 7^2 + 5^2 + 20^2 + 5^2 with 2*7 - 5 = 3^2 and 9*20^2 + 666*20*5 + 5^2 = 265^2.
a(1388) = 1 since 1388 = 15^2 + 21^2 + 19^2 + 19^2 with 2*15 - 21 = 3^2 and 9*19^2 + 666*19*19 + 19^2 = 494^2.
a(1867) = 1 since 1867 = 16^2 + 31^2 + 5^2 + 25^2 with 2*16 - 31 = 1^2 and 9*5^2 + 666*5*25 + 25^2 = 290^2.
a(4843) = 1 since 4843 = 11^2 + 13^2 + 52^2 + 43^2 with 2*11 - 13 = 3^2 and 9*52^2 + 666*52*43 + 43^2 = 1231^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[2x-y],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,0,Sqrt[n-x^2-y^2]}]],{y,0,Sqrt[4n/5]},{x,Ceiling[y/2],Sqrt[n-y^2]}];Print[n," ",r];Continue,{n,0,80}]

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.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 19 2017

Keywords

Comments

The first three values of n with a(n) = 0 are 1, 214635, 241483.
By the linked JNT paper, any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and x*(x-y) = 0, Whether x = 0 or x = y, both 9*x^2 + 246*x*y + y^2 and 9*x^2 + 666*x*y + y^2 are squares.

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.
		

Crossrefs

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}]
Showing 1-3 of 3 results.