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.

Previous Showing 31-40 of 70 results. Next

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.

A300791 Number of ways to write n as x^2 + y^2 + z^2 + w^2, where w is a positive integer and x,y,z are nonnegative integers for which x or y or z is a square and (12*x)^2 + (15*y)^2 + (20*z)^2 is also a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 12 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 16^k*m with k = 0,1,2,... and m = 1, 3, 4, 6, 7, 21, 23, 24, 39, 47, 86, 95, 344, 651, 764.
By the author's 2017 JNT paper, each n = 0,1,2,... can be written as the sum of a fourth power and three squares.
See also A300792 for two similar conjectures.

Examples

			a(6) = 1 since 6 = 0^2 + 1^2 + 1^2 + 2^2 with 0 = 0^2 and (12*0)^2 + (15*1)^2 + (20*1)^2 = 25^2.
a(7) = 1 since 7 = 1^2 + 2^2 + 1^2 + 1^2 with 1 = 1^2 and (12*1)^2 + (15*2)^2 + (20*1)^2 = 38^2.
a(21) = 1 since 21 = 4^2 + 0^2 + 1^2 + 2^2 with 4 = 2^2 and (12*4)^2 + (15*0)^2 + (20*1)^2 = 52^2.
a(39) = 1 since 39 = 5^2 + 2^2 + 1^2 + 3^2 with 1 = 1^2 and (12*5)^2 + (15*2)^2 + (20*1)^2 = 70^2.
a(344) = 1 since 344 = 0^2 + 10^2 + 10^2 + 12^2 with 0 = 0^2 and (12*0)^2 + (15*10)^2 + (20*10)^2 = 250^2.
a(764) = 1 since 764 = 7^2 + 3^2 + 25^2 + 9^2 with 25 = 5^2 and (12*7)^2 + (15*3)^2 + (20*25)^2 = 509^2.
a(8312) = 2 since 8312 = 42^2 + 36^2 + 34^2 + 64^2 with 36 = 6^2 and (12*42)^2 + (15*36)^2 + (20*34)^2 = 1004^2, and 8312 = 66^2 + 16^2 + 44^2 + 42^2 with 16 = 4^2 and (12*66)^2 + (15*16)^2 + (20*44)^2 = 1208^2.
		

Crossrefs

Programs

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

A300792 Number of ways to write n as x^2 + y^2 + z^2 + w^2, where w is a positive integer and x,y,z are nonnegative integers such that x or y or z is a square and 9*x^2 + 16*y^2 + 24*z^2 is also a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 12 2018

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 16^k*m with k = 0,1,2,... and m = 1, 3, 6, 14, 21, 24, 56, 79, 119, 143, 248, 301, 383, 591, 728, 959, 1223, 1751, 2311, 6119.
Conjecture 2: Any positive integer n can be written as x^2 + y^2 + z^2 + w^2, where w is a positive integer and x,y,z are nonnegative integers such that x or y or z is a square and 36*x^2 + 40*y^2 + 45*z^2 is also a square.
See also A300791 for a similar conjecture.

Examples

			a(6) = 1 since 6 = 1^2 + 1^2 + 0^2 + 2^2 with 1 = 1^2 and 9*1^2 + 16*1^2 + 24*0^2 = 5^2.
a(14) = 1 since 14 = 1^2 + 0^2 + 3^2 + 2^2 with 1 = 1^2 and 9*1^2 + 16*0^2 + 24*3^2 = 15^2.
a(728) = 1 since 728 = 10^2 + 0^2 + 12^2 + 22^2 with 0 = 0^2 and 9*10^2 + 16*0^2 + 24*12^2 = 66^2.
a(959) = 1 since 959 = 25^2 + 18^2 + 3^2 + 1^2 with 25 = 5^2 and 9*25^2 + 16*18^2 + 24*3^2 = 105^2.
a(1751) = 1 since 1751 = 19^2 + 25^2 + 18^2 + 21^2 with 25 = 5^2 and 9*19^2 + 16*25^2 + 24*18^2 = 145^2.
a(2311) = 1 since 2311 = 1^2 + 41^2 + 23^2 + 10^2 with 1 = 1^2 and 9*1^2 + 16*41^2 + 24*23^2 = 199^2.
a(6119) = 1 since 6119 = 1^2 + 5^2 + 3^2 + 78^2 with 1 = 1^2 and 9*1^2 + 16*5^2 + 24*3^2 = 25^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[(SQ[x]||SQ[y]||SQ[z])&&SQ[9x^2+16y^2+24z^2]&&SQ[n-x^2-y^2-z^2],r=r+1],{x,0,Sqrt[n-1]},{y,0,Sqrt[n-1-x^2]},{z,0,Sqrt[n-1-x^2-y^2]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A281975 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z <= w such that both x and |x-y| are squares.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 03 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,....
(ii) Each nonnegative integer n can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that |x-y| and 2*(y-z) (or 2*(z-y)) are both squares.
(iii) For each ordered pair (a,b) = (2,1), (3,1), (9,5), (14,10), any nonnegative integer n can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x and |a*x-b*y| are both squares.
The author has proved that each 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 (or x-y, or 2(x-y)) is a square.
See also A281976 and A281977 for similar conjectures.

Examples

			a(8) = 1 since 8 = 0^2 + 0^2 + 2^2 + 2^2 with 0 = 0^2 and |0-0| = 0^2.
a(12) = 1 since 12 = 1^2 + 1^2 + 1^2 + 3^2 with 1 = 1^2 and |1-1| = 0^2.
a(44) = 1 since 44 = 1^2 + 5^2 + 3^2 + 3^2 with 1 = 1^2 and |1-5| = 2^2.
a(47) = 1 since 47 = 1^2 + 1^2 + 3^2 + 6^2 with 1 = 1^2 and |1-1| = 0^2.
a(71) = 1 since 71 = 1^2 + 5^2 + 3^2 + 6^2 with 1 = 1^2 and |1-5| = 2^2.
a(95) = 1 since 95 = 1^2 + 2^2 + 3^2 + 9^2 with 1 = 1^2 and |1-2| = 1^2.
a(140) = 1 since 140 = 9^2 + 5^2 + 3^2 + 5^2 with 9 = 3^2 and |9-5| = 2^2.
a(428) = 1 since 428 = 9^2 + 13^2 + 3^2 + 13^2 with 9 = 3^2 and |9-13| = 2^2.
a(568) = 1 since 568 = 4^2 + 8^2 + 2^2 + 22^2 with 4 = 2^2 and |4-8| = 2^2.
a(632) = 1 since 632 = 16^2 + 12^2 + 6^2 + 14^2 with 16 = 4^2 and |16-12| = 2^2.
a(1144) = 1 since 1144 = 16^2 + 20^2 + 2^2 + 22^2 with 16 = 4^2 and |16-20| = 2^2.
a(1544) = 1 since 1544 = 0^2 + 0^2 + 10^2 + 38^2 with 0 = 0^2 and |0-0| = 0^2.
		

Crossrefs

Programs

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

A282494 Number of ways to write n as x^4 + y^2 + z^2 + w^2 with y*(y+240*z) a positive square, where x,y,z,w are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 16 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
By the linked JNT paper, any nonnegative integer can be expressed as the sum of a fourth power and three squares, and each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z*(y-2*z) = 0. Whether z = 0 or y = 2*z, the number y*(y+240*z) is definitely a square.
See also A282463 and A282495 for similar conjectures.

Examples

			a(3) = 1 since 3 = 1^4 + 1^2 + 0^2 + 1^2 with 1*(1+240*0) = 1^2.
a(4) = 1 since 4 = 0^4 + 2^2 + 0^2 + 0^2 with 2*(2+240*0) = 2^2.
a(39) = 1 since 39 = 1^4 + 2^2 + 3^2 + 5^2 with 2*(2+240*3) = 38^2.
a(188) = 1 since 188 = 3^4 + 5^2 + 1^2 + 9^2 with 5*(5+240*1) = 35^2.
a(399) = 1 since 399 = 3^4 + 10^2 + 7^2 + 13^2 with 10*(10+240*7) = 130^2.
a(428) = 1 since 428 = 0^4 + 10^2 + 2^2 + 18^2 with 10*(10+240*2) = 70^2.
a(439) = 1 since 439 = 1^4 + 10^2 + 7^2 + 17^2 with 10*(10+240*7) = 130^2.
a(508) = 1 since 508 = 1^4 + 5^2 + 11^2 + 19^2 with 5*(5+240*11) = 115^2.
a(748) = 1 since 748 = 3^4 + 1^2 + 21^2 + 15^2 with 1*(1+240*21) = 71^2.
a(1468) = 1 since 1468 = 2^4 + 10^2 + 26^2 + 26^2 with 10*(10+240*26) = 250^2.
a(2828) = 1 since 2828 = 3^4 + 5^2 + 11^2 + 51^2 with 5*(5+240*11) = 115^2.
		

Crossrefs

Programs

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

A282495 Number of ways to write n as x^4 + y^2 + z^2 + w^2 with y^2 + 228*y*z + 60*z^2 a square, where x,y,z are nonnegative integers and w is a positive integer.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 16 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
By the linked JNT paper, any nonnegative integer can be expressed as the sum of a fourth power and three squares, and each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z*(y-z) = 0. Whether z = 0 or y = z, the number y^2 + 228*y*z + 60*z^2 is definitely a square.
See also A282463 and A282494 for similar conjectures.

Examples

			a(7) = 1 since 7 = 1^4 + 1^2 + 1^2 + 2^2 with 1^2 + 228*1*1 + 60*1^2 = 17^2.
a(8) = 1 since 8 = 0^4 + 2^2 + 0^2 + 2^2 with 2^2 + 228*2*0 + 60*0^2 = 2^2.
a(15) = 1 since 15 = 1^4 + 1^2 + 3^2 + 2^2 with 1^2 + 228*1*3 + 60*3^2 = 35^2.
a(23) = 1 since 23 = 1^4 + 3^2 + 3^2 + 2^2 with 3^2 + 228*3*3 + 60*3^2 = 51^2.
a(71) = 1 since 71 = 1^4 + 5^2 + 6^2 + 3^2 with 5^2 + 228*5*6 + 60*6^2 = 95^2.
a(159) = 1 since 159 = 3^4 + 7^2 + 2^2 + 5^2 with 7^2 + 228*7*2 + 60*2^2 = 59^2.
a(623) = 1 since 623 = 3^4 + 1^2 + 10^2 + 21^2 with 1^2 + 228*1*10 + 60*10^2 = 91^2.
a(879) = 1 since 879 = 5^4 + 5^2 + 15^2 + 2^2 with 5^2 + 228*5*15 + 60*15^2 = 175^2.
a(1423) = 1 since 1423 = 1^4 + 7^2 + 2^2 + 37^2 with 7^2 + 228*7*2 + 60*2^2 = 59^2.
a(3768) = 1 since 3768 = 0^4 + 2^2 + 20^2 + 58^2 with 2^2 + 228*2*20 + 60*20^2 = 182^2.
		

Crossrefs

Programs

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

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}]

A290935 Number of ways to write 2*n+1 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x^2 + 3*y^2 + 5*z^2 + 7*w^2 and p - 2 are twin prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 23 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 1, 4, 5, 11, 13, 19, 61.
This refinement of Lagrange's four-square theorem implies the twin prime conjecture.
Below we list some similar conjectures:
(i) Any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = 3*x^2 + 5*y^2 + 11*z^2 + 13*w^2 and p + 2 are twin prime.
(ii) Each positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x + y + 3*z + 5*w and p + 2 (or p - 2) are twin prime.
(iii) Any positive odd integer can be can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x^3 + y^3 + z^3 + 3*w^3 is prime.
(iv) For each m = 1,2,3, any positive integer not divisible by 4 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x^m + 2*y^m + 3*z^m + 4*w^m is prime.
(v) Let n be any positive integer not divisible by 4. Then we can write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2*x^4 + 3*y^4 + 4*z^4 + 5*w^4 is prime. Also, we can write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 3*x^5 + 4*y^5 + 5*z^6 + 6*w^5 is prime.

Examples

			a(0) = 2 since 2*0+1 = 0^2 + 0^2 + 1^2 + 0^2 with 0^2 + 3*0^2 + 5*1^2 + 7*0^2 = 5 and 5 - 2 = 3 twin prime, and 2*0+1 = 0^2 + 0^2 + 0^2 + 1^2 with 0^2 + 3*0^2 + 5*0^2 + 7*1^2 = 7 and 7 - 2 = 5 prime.
a(1) = 1 since 2*1+1 = 1^2 + 0^2 + 1^2 + 1^2 with 1^2 + 3*0^2 + 5*1^2 + 7*1^2 = 13 and 13 - 2 = 11 twin prime.
a(4) = 1 since 2*4+1 = 2^2 + 0^2 + 2^2 + 1^2 with 2^2 + 3*0^2 + 5*2^2 + 7*1^2 = 31 and 31 - 2 = 29 twin prime.
a(5) = 1 since 2*5+1 = 3^2 + 1^2 + 0^2 + 1^2 with 3^2 + 3*1^2 + 5*0^2 + 7*1^2 = 19 and 19 - 2 twin prime.
a(11) = 1 since 2*11+1 = 3^2 + 2^2 + 3^2 + 1^2 with 3^2 + 3*2^2 + 5*3^2 + 7*1^2 = 73 and 73 - 2 = 71 twin prime.
a(13) = 1 since 2*13+1 = 1^2 + 0^2 + 1^2 + 5^2 with 1^2 + 3*0^2 + 5*1^2 + 7*5^2 = 181 and 181 - 2 = 179 twin prime.
a(19) = 1 since 2*19+1 = 1^2 + 3^2 + 5^2 + 2^2 with 1^2 + 3*3^2 + 5*5^2 + 7*2^2 = 181 and 181 - 2 = 179 twin prime.
a(61) = 1 since 2*61+1 = 7^2 + 3^2 + 7^2 + 4^2 with 7^2 + 3*3^2 + 5*7^2 + 7*4^2 = 433 and 433 - 2 = 431 twin prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    TQ[p_]:=TQ[p]=PrimeQ[p]&&PrimeQ[p-2];
    Do[r=0;Do[If[SQ[2n+1-x^2-y^2-z^2]&&TQ[x^2+3y^2+5z^2+7(2n+1-x^2-y^2-z^2)],r=r+1],{x,0,Sqrt[2n+1]},{y,0,Sqrt[2n+1-x^2]},{z,0,Sqrt[2n+1-x^2-y^2]}];Print[n," ",r],{n,0,80}]

A291150 Number of ways to write 2*n+1 as x^2 + y^2 + z^2 + 4*w^2, where x,y,z,w are nonnegative integers with x <= y <= z such that 2^x + 2^y + 2^z + 1 is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 19 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 1, 2, 3, 5, 7, 11, 14, 15, 21, 23, 35, 41, 43, 59, 71, 309, 435.
(ii) Any positive even number not divisibly by 8 and other than 6 and 14 can be written as x^2 + y^2 + z^2 + w^2, where w is a positive odd integer, and x,y,z are nonnegative integers with 2^x + 2^y + 2^z + 1 prime.
(iii) Let n be a positive integer. If n is not divisible by 8, then n can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 2^y + 1 is prime. If n is not a multiple of 2^7 = 128, then we can write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 2^y - 1 is prime.
(iv) Let n be a positive integer. If n is not divisible by 8, then n can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 2*2^y + 3*2^z + 4*2^w - 1 is prime. If n is not a multiple of 2^8 = 256, then we can write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 2*2^y +3*2^z + 4*2^w + 1 is prime.
I have verified that a(n) > 0 for all n = 0..10^7. - Zhi-Wei Sun, Aug 23 2017

Examples

			a(0) = 1 since 2*0+1 = 0^2 + 0^2 + 1^2 + 4*0^2 with 2^0 + 2^0 + 2^1 + 1 = 5 prime.
a(14) = 1 since 2*14+1 = 2^2 + 3^2 + 4^2 + 4*0^2 with 2^2 + 2^3 + 2^4 + 1 = 29 prime.
a(35) = 1 since 2*35+1 = 1^2 + 3^2 + 5^2 + 4*3^2 with 2^1 + 2^3 + 2^5 + 1 = 43 prime.
a(43) = 1 since 2*43+1 = 1^2 + 5^2 + 5^2 + 4*3^2 with 2^1 + 2^5 + 2^5 + 1 = 67 prime.
a(59) = 1 since 2*59+1 = 1^2 + 3^2 + 3^2 + 4*5^2 with 2^1 + 2^3 + 2^3 + 1 = 19 prime.
a(71) = 1 since 2*71+1 = 1^2 + 5^2 + 9^2 + 4*3^2 with 2^1 + 2^5 + 2^9 + 1 = 547 prime.
a(309) = 1 since 2*309+1 = 5^2 + 13^2 + 13^2 + 4*8^2 with 2^5 + 2^13 + 2^13 + 1 = 16417 prime.
a(435) = 1 since 2*435+1 = 13^2 + 13^2 + 23^2 + 4*1^2 with 2^13 + 2^13 + 2^23 + 1 = 8404993 prime.
		

Crossrefs

Programs

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

A291191 Number of ways to write 2*n+1 as x^2 + y^2 + z^2 + w^2, where x,y,z,w are nonnegative integers with x <= y, z <= w and x + y < z + w such that 2^(x+y) + 2^(z+w) + 1 is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 20 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 3, 6, 7, 11, 12, 16, 19, 20, 23, 26, 63, 75, 98.
(ii) Any integer n > 1 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^(x+y) + 2^(z+w) is a practical number (A005153).
(iii) Any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^(x+y) + 3^(z+w) is prime.
(iv) Any positive integer not divisible by 32 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 3^y + 4^z is prime.
See also A291150 for a similar conjecture.
I have verified that a(n) > 0 for all n = 1..10^7. For example, a(6998538) > 0 since 2*6998538+1 = 122^2 + 220^2 + 208^2 + 3727^2 with 2^(122+220) + 2^(208+3727) + 1 = 2^342 + 2^3935 + 1 a prime of 1185 decimal digits. - Zhi-Wei Sun, Aug 23 2017

Examples

			a(1) = 1 since 2*1+1 = 0^2 + 1^2 + 1^2 + 1^2 with 2^(0+1) + 2^(1+1) + 1 = 7 prime.
a(2) = 1 since 2*2+1 = 0^2 + 1^2 + 0^2 + 2^2 with 2^(0+1) + 2^(0+2) + 1 = 7 prime.
a(19) = 1 since 2*19+1 = 2^2 + 3^2 + 1^2 + 5^2 with 2^(2+3) + 2^(1+5) + 1 = 97 prime.
a(26) = 1 since 2*26+1 = 1^2 + 4^2 + 0^2 + 6^2 with 2^(1+4) + 2^(0+6) + 1 = 97 prime.
a(63) = 1 since 2*63+1 = 1^2 + 5^2 + 1^2 +10^2 with 2^(1+5) + 2^(1+10) + 1 = 2113 prime.
a(75) = 1 since 2*75+1 = 1^2 + 5^2 + 5^2 + 10^2 with 2^(1+5) + 2^(5+10) + 1 = 32833 prime.
a(98) = 1 since 2*98+1 = 6^2 + 6^2 + 2^2 + 11^2 with 2^(6+6) + 2^(2+11) + 1 = 12289 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[2n+1-x^2-y^2-z^2]&&x+y
    				
Previous Showing 31-40 of 70 results. Next