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 14 results. Next

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

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

A273134 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (x+8*y+8*z+15*w)^2+(6*(x+y+z+w))^2 a square, where x,y,z,w are nonnegative integers with y < z.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 4, 2, 1, 1, 2, 1, 1, 3, 2, 3, 3, 1, 1, 2, 1, 3, 3, 1, 3, 3, 3, 1, 1, 2, 5, 3, 2, 3, 1, 2, 2, 3, 2, 2, 4, 2, 4, 3, 1, 3, 4, 2, 4, 3, 1, 3, 1, 2, 5, 4, 3, 2, 3, 1, 4, 5, 2, 3, 5, 3, 2, 2, 1
Offset: 1

Views

Author

Zhi-Wei Sun, May 16 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 3, 7, 11, 15, 21, 23, 35, 39, 71, 95, 4^k*m (k = 0,1,2,... and m = 1, 2, 5, 6, 10, 14, 29, 30, 46, 62, 94, 110, 142, 190, 238, 334, 446).
(ii) For each polynomial P(x,y,z,w) = (x+3y+6z+17w)^2 + (20x+4y+8z+4w)^2, (x+3y+9z+17w)^2 + (20x+4y+12z+4w)^2, (x+3y+11z+15w)^2 + (12x+4y+4z+20w)^2, (3*(x+2y+3z+4w))^2 + (4*(x+4y+3z+2w))^2, (3*(x+2y+3z+4w))^2 + (4*(x+5y+3z+w))^2, any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that P(x,y,z,w) is a square.
Part (i) of this conjecture implies that any positive integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x+8*y+8*z+15*w and 6*(x+y+z+w) are the two legs of a right triangle with positive integer sides. If a nonnegative integer n is not of the form 4^k*(16m+14) (k,m = 0,1,2,...), then n can be written as w^2+x^2+y^2+z^2 with w = x and hence (x+8y+8z+15w)^2 + (6(x+y+z+w))^2 = (8(2x+y+z))^2 + (6(2x+y+z))^2 = (10(2x+y+z))^2. Similar remarks apply to part (ii) of the conjecture.
See also A271714, A273107, A273108 and A273110 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 + 0^2 + 1^2 + 0^2 with 0 < 1 and (0+8*0+8*1+15*0)^2 + (6*(0+0+1+0))^2 = 10^2.
a(2) = 1 since 2 = 1^2 + 0^2 + 1^2 + 0^2 with 0 < 1 and (1+8*0+8*1+15*0)^2 + (6*(1+0+1+0))^2 = 15^2.
a(3) = 1 since 3 = 1^2 + 0^2 + 1^2 + 1^2 with 0 < 1 and (1+8*0+8*1+15*1)^2 + (6*(1+0+1+1))^2 = 30^2.
a(5) = 1 since 5 = 0^2 + 1^2 + 2^2 + 0^2 with 1 < 2 and (0+8*1+8*2+15*0)^2 + (6*(0+1+2+0))^2 = 30^2.
a(6) = 1 since 6 = 1^2 + 0^2 + 2^2 + 1^2 with 0 < 2 and (1+8*0+8*2+15*1)^2 + (6*(1+0+2+1))^2 = 40^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 2^2 + 1^2 with 1 < 2 and (1+8*1+8*2+15*1)^2 + (6*(1+1+2+1))^2 = 50^2.
a(10) = 1 since 10 = 0^2 + 1^2 + 3^2 + 0^2 with 1 < 3 and (0+8*1+8*3+15*0)^2 + (6*(0+1+3+0))^2 = 40^2.
a(11) = 1 since 11 = 1^2 + 0^2 + 3^2 + 1^2 with 0 < 3 and (1+8*0+8*3+15*1)^2 + (6*(1+0+3+1))^2 = 50^2.
a(14) = 1 since 14 = 3^2 + 1^2 + 2^2 + 0^2 with 1 < 2 and (3+8*1+8*2+15*0)^2 + (6*(3+1+2+0))^2 = 45^2.
a(15) = 1 since 15 = 1^2 + 2^2 + 3^2 + 1^2 with 2 < 3 and (1+8*2+8*3+15*1)^2 + (6*(1+2+3+1))^2 = 70^2.
a(21) = 1 since 21 = 2^2 + 2^2 + 3^2 + 2^2 with 2 < 3 and (2+8*2+8*3+15*2)^2 + (6*(2+2+3+2))^2 = 90^2.
a(23) = 1 since 23 = 3^2 + 1^2 + 2^2 + 3^2 with 1 < 2 and (3+8*1+8*2+15*3)^2 + (6*(3+1+2+3))^2 = 90^2.
a(29) = 1 since 29 = 0^2 + 2^2 + 5^2 + 0^2 with 2 < 5 and (0+8*2+8*5+15*0)^2 + (6*(0+2+5+0))^2 = 70^2.
a(30) = 1 since 30 = 5^2 + 0^2 + 2^2 + 1^2 with 0 < 2 and (5+8*0+8*2+15*1)^2 + (6*(5+0+2+1))^2 = 60^2.
a(35) = 1 since 35 = 3^2 + 1^2 + 4^2 + 3^2 with 1 < 4 and (3+8*1+8*4+15*3)^2 + (6*(3+1+4+3))^2 = 110^2.
a(39) = 1 since 39 = 1^2 + 1^2 + 6^2 + 1^2 with 1 < 6 and (1+8*1+8*6+15*1)^2 + (6*(1+1+6+1))^2 = 90^2.
a(46) = 1 since 46 = 6^2 + 0^2 + 3^2 + 1^2 with 0 < 3 and (6+8*0+8*3+15*1)^2 + (6*(6+0+3+1))^2 = 75^2.
a(62) = 1 since 62 = 6^2 + 1^2 + 5^2 + 0^2 with 1 < 5 and (6+8*1+8*5+15*0)^2 + (6*(6+1+5+0))^2 = 90^2.
a(71) = 1 since 71 = 3^2 + 2^2 + 7^2 + 3^2 with 2 < 7 and (3+8*2+8*7+15*3)^2 + (6*(3+2+7+3))^2 = 150^2.
a(94) = 1 since 94 = 9^2 + 0^2 + 3^2 + 2^2 with 0 < 3 and (9+8*0+8*3+15*2)^2 + (6*(9+0+3+2))^2 = 105^2.
a(95) = 1 since 95 = 5^2 + 3^2 + 6^2 + 5^2 with 3 < 6 and (5+8*3+8*6+15*5)^2 + (6*(5+3+6+5))^2 = 190^2.
a(110) = 1 since 110 = 10^2 + 0^2 + 1^2 + 3^2 with 0 < 1 and (10+8*0+8*1+15*3)^2 + (6*(10+0+1+3))^2 = 105^2.
a(142) = 1 since 142 = 11^2 + 1^2 + 4^2 + 2^2 with 1 < 4 and (11+8*1+8*4+15*2)^2 + (6*(11+1+4+2))^2 = 135^2.
a(190) = 1 since 190 = 12^2 + 3^2 + 6^2 + 1^2 with 3 < 6 and (12+8*3+8*6+15*1)^2 + (6*(12+3+6+1))^2 = 165^2.
a(238) = 1 since 238 = 13^2 + 2^2 + 8^2 + 1^2 with 2 < 8 and (13+8*2+8*8+15*1)^2 + (6*(13+2+8+1))^2 = 180^2.
a(334) = 1 since 334 = 4^2 + 2^2 + 5^2 + 17^2 with 2 < 5 and
(4+8*2+8*5+15*17)^2 + (6*(4+2+5+17))^2 = 357^2.
a(446) = 1 since 446 = 17^2 + 6^2 + 11^2 + 0^2 with 6 < 11 and (17+8*6+8*11+15*0)^2 + (6*(17+6+11+0))^2 = 255^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+8*y+8*z+15*Sqrt[n-x^2-y^2-z^2])^2+36(x+y+z+Sqrt[n-x^2-y^2-z^2])^2],r=r+1],{x,0,Sqrt[n-1]},{y,0,(Sqrt[2(n-x^2)-1]-1)/2},{z,y+1,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,1,80}]

A273278 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x^2*y^2 + 3*y^2*z^2 + 2*z^2*w^2 is a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 18 2016

Keywords

Comments

Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 4^k*m (k = 0,1,2,... and m = 7, 39, 87, 183, 231, 807, 879, 959, 1479, 2391, 2519, 2759, 4359, 10887).
See part (ii) of the conjecture in A269400 for similar conjectures.
For more conjectural refinements of Lagrange's four-square theorem, one may consult arXiv:1604.06723.

Examples

			a(7) = 1 since 7 = 2^2 + 1^2 + 1^2 + 1^2 with 2^2*1^2 + 3*1^2*1^2 + 2*1^2*1^2 = 3^2.
a(39) = 1 since 39 = 2^2 + 1^2 + 5^2 + 3^2 with 2^2*1^2 + 3*1^2*5^2 + 2*5^2*3^2 = 23^2.
a(87) = 1 since 87 = 2^2 + 1^2 + 1^2 + 9^2 with 2^2*1^2 + 3*1^2*1^2 + 2*1^2*9^2 = 13^2.
a(183) = 1 since 183 = 10^2 + 7^2 + 5^2 + 3^2 with 10^2*7^2 + 3*7^2*5^2 + 2*5^2*3^2 = 95^2.
a(231) = 1 since 231 = 10^2 + 1^2 + 9^2 + 7^2 with 10^2*1^2 + 3*1^2*9^2 + 2*9^2*7^2 = 91^2.
a(807) = 1 since 807 = 10^2 + 23^2 + 3^2 + 13^2 with 10^2*23^2 + 3*23^2*3^2 + 2*3^2*13^2 = 265^2.
a(879) = 1 since 879 = 14^2 + 11^2 + 21^2 + 11^2 with 14^2*11^2 + 3*11^2*21^2 + 2*21^2*11^2 = 539^2.
a(959) = 1 since 959 = 10^2 + 15^2 + 25^2 + 3^2 with 10^2*15^2 + 3*15^2*25^2 + 2*25^2*3^2 = 675^2.
a(1479) = 1 since 1479 = 34^2 + 11^2 + 11^2 + 9^2 with 34^2*11^2 + 3*11^2*11^2 + 2*11^2*9^2 = 451^2.
a(2391) = 1 since 2391 = 34^2 + 11^2 + 5^2 + 33^2 with 34^2*11^2 + 3*11^2*5^2 + 2*5^2*33^2 = 451^2.
a(2519) = 1 since 2519 = 42^2 + 1^2 + 27^2 + 5^2 with 42^2*1^2 + 3*1^2*27^2 + 2*27^2*5^2 = 201^2.
a(2759) = 1 since 2759 = 26^2 + 21^2 + 11^2 + 39^2 with 26^2*21^2 + 3*21^2*11^2 + 2*11^2*39^2 = 909^2.
a(4359) = 1 since 4359 = 46^2 + 19^2 + 19^2 + 39^2 with 46^2*19^2 + 3*19^2*19^2 + 2*19^2*39^2 = 1501^2.
a(10887) = 1 since 10887 = 31^2 + 85^2 + 51^2 + 10^2 with 31^2*85^2 + 3*85^2*51^2 + 2*51^2*10^2 = 7990^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^2*y^2+3*y^2*z^2+2z^2*(n-x^2-y^2-z^2)],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,0,70}]

A273294 Least nonnegative integer m such that there are nonnegative integers x,y,z,w for which x^2 + y^2 + z^2 + w^2 = n and x + 3*y + 5*z = m^2.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 19 2016

Keywords

Comments

Clearly, a(n) = 0 if n is a square. Part (i) of the conjecture in A271518 implies that a(n) always exists.
For more conjectural refinements of Lagrange's four-square theorem, one may consult arXiv:1604.06723.

Examples

			a(1) = 0 since 1 = 0^2 + 0^2 + 0^2 + 1^2 with 0 + 3*0 + 5*0 = 0^2.
a(2) = 1 since 2 = 1^2 + 0^2 + 0^2 + 1^2 with 1 + 3*0 + 5*0 = 1^2.
a(3) = 2 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 1 + 3*1 + 5*0 = 2^2.
a(3812) = 11 since 3812 = 37^2 + 3^2 + 15^2 + 47^2 with 37 + 3*3 + 5*15 = 11^2.
a(3840) = 16 since 3840 = 48^2 + 16^2 + 32^2 + 16^2 with 48 + 3*16 + 5*32 = 16^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[m=0;Label[bb];Do[If[3y+5z<=m^2&&SQ[n-y^2-z^2-(m^2-3y-5z)^2],Print[n," ",m];Goto[aa]],{y,0,Sqrt[n]},{z,0,Sqrt[n-y^2]}];m=m+1;Goto[bb];Label[aa];Continue,{n,0,80}]

A273302 Least nonnegative integer x such that n = x^2 + y^2 + z^2 + w^2 for some nonnegative integer y,z,w with x + 3*y + 5*z a square.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 1, 1, 0, 0, 5, 4, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 4, 0, 0, 1, 1, 4, 0, 1, 0, 0, 0, 0, 5, 0, 0, 2, 0, 0, 1, 0, 1, 1, 2, 3, 0, 0, 0, 1, 0, 0, 0, 3, 4
Offset: 0

Views

Author

Zhi-Wei Sun, May 19 2016

Keywords

Comments

Clearly, a(n) = 0 if n is a square. Part (i) of the conjecture in A271518 implies that a(n) always exists.
Compare this sequence with A273294.
For more conjectural refinements of Lagrange's four-square theorem, one may consult arXiv:1604.06723.

Examples

			a(6) = 1 since 6 = 1^2 + 1^2 + 0^2 + 2^2 with 1 + 3*1 + 5*0 = 2^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 + 3*1 + 5*1 = 3^2.
a(15) = 2 since 15 = 2^2 + 3^2 + 1^2 + 1^2 with 2 + 3*3 + 5*1 = 4^2.
a(31) = 5 since 31 = 5^2 + 2^2 + 1^2 + 1^2 with 5 + 3*2 + 5*1 = 4^2.
a(32) = 4 since 32 = 4^2 + 0^2 + 0^2 + 4^2 with 4 + 3*0 + 5*0 = 2^2.
a(2384) = 24 since 2384 = 24^2 + 12^2 + 8^2 + 40^2 with 24 + 3*12 + 5*8 = 10^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[Do[If[SQ[n-x^2-y^2-z^2]&&SQ[x+3y+5z],Print[n," ",x];Goto[aa]],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Label[aa];Continue,{n,0,80}]

A273429 Number of ordered ways to write n as x^6 + y^2 + z^2 + w^2, where x,y,z,w are nonnegative integers with y <= z <= w.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 22 2016

Keywords

Comments

The author proved in arXiv:1604.06723 that for each c = 1, 4 any natural number can be written as c*x^6 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers. Thus a(n) > 0 for all n = 0,1,2,....
We note that a(n) = 1 for the following values of n not divisible by 2^6: 7, 8, 15, 16, 23, 24, 31, 32, 40, 47, 48, 56, 71, 79, 92, 112, 143, 176, 191, 240, 304, 368, 560, 624, 688, 752, 1072, 1136, 1456, 1520, 1840, 1904, 2608, 2672, 3760, 3824, 6512, 6896.
For more conjectural refinements of Lagrange's four-square theorem, one may consult the author's preprint arXiv:1604.06723.

Examples

			a(7) = 1 since 7 = 1^6 + 1^2 + 1^2 + 2^2 with 1 = 1 < 2.
a(8) = 1 since 8 = 0^6 + 0^2 + 2^2 + 2^2 with 0 < 2 = 2.
a(15) = 1 since 15 = 1^6 + 1^2 + 2^2 + 3^2 with 1 < 2 < 3.
a(16) = 1 since 16 = 0^6 + 0^2 + 0^2 + 4^2 with 0 = 0 < 4.
a(56) = 1 since 56 = 0^6 + 2^2 + 4^2 + 6^2 with 2 < 4 < 6.
a(71) = 1 since 71 = 1^6 + 3^2 + 5^2 + 6^2 with 3 < 5 < 6.
a(79) = 1 since 79 = 1^6 + 2^2 + 5^2 + 7^2 with 2 < 5 < 7.
a(92) = 1 since 92 = 1^6 + 1^2 + 3^2 + 9^2 with 1 < 3 < 9.
a(143) = 1 since 143 = 1^6 + 5^2 + 6^2 + 9^2 with 5 < 6 < 9.
a(191) = 1 since 191 = 1^6 + 3^2 + 9^2 + 10^2 with 3 < 9 < 10.
a(624) = 1 since 624 = 2^6 + 4^2 + 12^2 + 20^2 with 4 < 12 < 20.
a(2672) = 1 since 2672 = 2^6 + 4^2 + 36^2 + 36^2 with 4 < 36 = 36.
a(3760) = 1 since 3760 = 0^6 + 4^2 + 12^2 + 60^2 with 4 < 12 < 60.
a(3824) = 1 since 3824 = 2^6 + 4^2 + 12^2 + 60^2 with 4 < 12 < 60.
a(6512) = 1 since 6512 = 2^6 + 12^2 + 52^2 + 60^2 with 12 < 52 < 60.
a(6896) = 1 since 6896 = 2^6 + 36^2 + 44^2 + 60^2 with 36 < 44 < 60.
		

Crossrefs

Programs

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

A273404 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x + 24*y a square, where x,y,z,w are nonnegative integers with z <= w.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 21 2016

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 = 8, 12, 23, 24, 47, 71, 168, 344, 632).
For more conjectural refinements of Lagrange's four-square theorem, one may consult arXiv:1604.06723.

Examples

			a(8) = 1 since 8 = 0^2 + 0^2 + 2^2 + 2^2 with 0 + 24*0 = 0^2.
a(12) = 1 since 12 = 1^2 + 1^2 + 1^2 + 3^2 with 1 + 24*1 = 5^2.
a(23) = 1 since 23 = 1^2 + 2^2 + 3^2 + 3^2 with 1 + 24*2 = 7^2.
a(24) = 1 since 24 = 4^2 + 0^2 + 2^2 + 2^2 with 4 + 24*0 = 2^2.
a(47) = 1 since 47 = 1^2 + 1^2 + 3^2 + 6^2 with 1 + 24*1 = 5^2.
a(71) = 1 since 71 = 1^2 + 5^2 + 3^2 + 6^2 with 1 + 24*5 = 11^2.
a(168) = 1 since 168 = 4^2 + 4^2 + 6^2 + 10^2 with 4 + 24*4 = 10^2.
a(344) = 1 since 344 = 4^2 + 0^2 + 2^2 + 18^2 with 4 + 24*0 = 2^2.
a(632) = 1 since 632 = 0^2 + 6^2 + 14^2 + 20^2 with 0 + 24*6 = 12^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+24y],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[(n-x^2-y^2)/2]}];Print[n," ",r];Label[aa];Continue,{n,0,80}]

A273432 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with 2*x + y - z a nonnegative cube, where x,y,z,w are nonnegative integers with y <= z.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 22 2016

Keywords

Comments

Conjecture: (i) For each c = 1, 2, 4 and n = 0,1,2,..., we can write n as x^2 + y^2 + z^2 + w^2 with c*(2x+y-z) a nonnegative cube, where x,y,z,w are nonnegative integers with y <= z.
(ii) Each n = 0,1,2,.... can be written as x^2 + y^2 + z^2 + w^2 with x-y+z a nonnegative cube, where x,y,z,w are integers with x >= y >= 0 and x >= |z|.
The author proved in arXiv:1604.06723 that for each a = 1, 2 any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that x + y + a*z is a cube.
See also A273458 for a similar conjecture.
For more conjectural refinements of Lagrange's four-square theorem, see the author's preprint arXiv:1604.06723.

Examples

			a(1) = 1 since 1 = 0^2 + 0^2 + 0^2 + 1^2 with 0 = 0 and 2*0 + 0 - 0 = 0^3.
a(4) = 1 since 4 = 0^2 + 0^2 + 0^2 + 2^2 with 0 = 0 and 2*0 + 0 - 0 = 0^3.
a(8) = 1 since 8 = 0^2 + 2^2 + 2^2 + 0^2 with 2 = 2 and 2*0 + 2 - 2 = 0^3.
a(10) = 1 since 10 = 1^2 + 1^2 + 2^2 + 2^2 with 1 < 2 and 2*1 + 1 - 2 = 1^3.
a(13) = 1 since 13 = 2^2 + 0^2 + 3^2 + 0^2 with 0 < 3 and 2*2 + 0 - 3 = 1^3.
a(23) = 1 since 23 = 1^2 + 2^2 + 3^2 + 3^2 with 2 < 3 and 2*1 + 2 - 3 = 1^3.
a(26) = 1 since 26 = 1^2 + 3^2 + 4^2 + 0^2 with 3 < 4 and 2*1 + 3 - 4 = 1^3.
a(28) = 1 since 28 = 4^2 + 2^2 + 2^2 + 2^2 with 2 = 2 and 2*4 + 2 - 2 = 2^3.
a(40) = 1 since 40 = 4^2 + 2^2 + 2^2 + 4^2 with 2 = 2 and 2*4 + 2 - 2 = 2^3.
a(104) = 1 since 104 = 4^2 + 6^2 + 6^2 + 4^2 with 6 = 6 and 2*4 + 6 - 6 = 2^3.
a(138) = 1 since 138 = 3^2 + 5^2 + 10^2 + 2^2 with 5 < 10 and 2*3 + 5 - 10 =1^3.
a(200) = 1 since 200 = 0^2 + 10^2 + 10^2 + 0^2 with 10 = 10 and 2*0 + 10 - 10 = 0^3.
a(296) = 1 since 296 = 8^2 + 6^2 + 14^2 + 0^2 with 6 < 14 and 2*8 + 6 - 14 = 2^3.
a(328) = 1 since 328 = 0^2 + 6^2 + 6^2 + 16^2 with 6 = 6 and 2*0 + 6 - 6 = 0^3.
a(520) = 1 since 520 = 4^2 + 2^2 + 10^2 + 20^2 with 2 < 10 and 2*4 + 2 - 10 = 0^3.
a(776) = 1 since 776 = 0^2 + 10^2 + 10^2 + 24^2 with 10 = 10 and 2*0 + 10 - 10 = 0^3.
a(1832) = 1 since 1832 = 4^2 + 30^2 + 30^2 + 4^2 with 30 = 30 and 2*4 + 30 - 30 = 2^3.
a(2976) = 1 since 2976 = 20^2 + 16^2 + 48^2 + 4^2 with 16 < 48 and 2*20 + 16 - 48 = 2^3.
		

Crossrefs

Programs

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

A273458 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x-y+z+w a nonnegative cube, where x,y,z,w are integers with x >= y >= 0 and x >= |z| <= |w|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 22 2016

Keywords

Comments

Conjecture: a(n) > 0 for all n = 0,1,2,....
In the latest version of arXiv:1605.03074, the authors showed that any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that x + y + z + w is a cube (or a square).
For more conjectural refinements of Lagrange's four-square theorem, see the author's preprint arXiv:1604.06723.

Examples

			a(12) = 1 since 12 = 3^2 + 1^2 + (-1)^2 + (-1)^2 with 3 - 1 + (-1) + (-1) = 0^3.
a(17) = 1 since 17 = 2^2 + 0^2 + 2^2 + (-3)^2 with 2 - 0 + 2 + (-3) = 1^3.
a(28) = 1 since 28 = 3^2 + 1^2 + 3^2 + 3^2 with 3 - 1 + 3 + 3 = 2^3.
a(29) = 1 since 29 = 3^2 + 0^2 + 2^2 + (-4)^2 with 3 - 0 + 2 + (-4) = 1^3.
a(71) = 1 since 71 = 5^2 + 1^2 + 3^2 + (-6)^2 with 5 - 1 + 3 + (-6) = 1^3.
a(149) = 1 since 149 = 8^2 + 0^2 + 2^2 + (-9)^2 with 8 - 0 + 2 + (-9) = 1^3.
a(188) = 1 since 188 = 13^2 + 3^2 + 1^2 + (-3)^2 with 13 - 3 + 1 + (-3) = 2^3.
a(284) = 1 since 284 = 15^2 + 5^2 + 3^2 + (-5)^2 with 15 - 5 + 3 + (-5) = 2^3.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    CQ[n_]:=CQ[n]=n>=0&&IntegerQ[n^(1/3)]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&CQ[x-y+(-1)^j*z+(-1)^k*Sqrt[n-x^2-y^2-z^2]],r=r+1],{y,0,(n/2)^(1/2)},{x,y,Sqrt[n-y^2]},{z,0,Min[x,Sqrt[(n-x^2-y^2)/2]]},{j,0,Min[1,z]},{k,0,Min[1,Sqrt[n-x^2-y^2-z^2]]}];
    Print[n," ",r];Continue,{n,0,80}]
Showing 1-10 of 14 results. Next