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.

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 04 2017

Keywords

Comments

Conjecture: (i) a(2^k*m) > 0 for any positive odd integers k and m. Also, a(4*n+1) = 0 only for n = 63.
(ii) For any positive odd integers k and m, we can write 2^k*m as x^2 + y^2 + z^2 with x,y,z integers such that x + 3*y + 5*z is twice a square.
(iii) For any positive odd integer n not congruent to 7 modulo 8, we can write n as x^2 + y^2 + z^2 with x,y,z integers such that x + 3*y + 4*z is a square.
(iv) Let n be any nonnegative integer. Then we can write 8*n + 1 as x^2 + y^2 + z^2 with x + 3*y a square, where x and y are integers, and z is a positive integer. Also, except for n = 2255, 4100 we can write 4*n + 2 as x^2 + y^2 + z^2 with x + 3*y a square, where x,y,z are integers.
(v) For each n = 0,1,2,..., we can write 8*n + 6 as x^2 + y^2 + z^2 with x + 2*y a square, where x,y,z are integers with y nonnegative and z odd.
The Gauss-Legendre theorem asserts that a nonnegative integer can be written as the sum of three squares if and only if it is not of the form 4^k*(8m+7) with k and m nonnegative integers. Thus a(4^k*(8m+7)) = 0 for all k,m = 0,1,2,....
See also A283273 for a similar conjecture.

Examples

			a(11) = 1 since 11 = 3^2 + 1^2 + (-1)^2 with 3 + 3*1 + 5*(-1) = 1^2.
a(43) = 1 since 43 = (-5)^2 + (-3)^2 + 3^2 with (-5) + 3*(-3) + 5*3 = 1^2.
a(75) = 1 since 75 = (-1)^2 + 5^2 + 7^2 with (-1) + 3*5 + 5*7 = 7^2.
a(262) = 1 since 262 = 1^2 + 15^2 + (-6)^2 with 1 + 3*15 + 5*(-6) = 4^2.
a(277) = 1 since 277 = (-6)^2 + 4^2 + 15^2 with (-6) + 3*4 + 5*15 = 9^2.
a(617) = 1 since 617 = 17^2 + 18^2 + 2^2 with 17 + 3*18 + 5*2 = 9^2.
a(1430) = 1 since 1430 = (-13)^2 + (-6)^2 + 35^2 with (-13) + 3*(-6) + 5*35 = 12^2.
a(5272) = 1 since 5272 = (-66)^2 + 30^2 + (-4)^2 with (-66) + 3*30 + 5*(-4) = 2^2.
a(7630) = 1 since 7630 = (-78)^2 + 39^2 + 5^2 with (-78) + 3*39 + 5*5 = 8^2.
a(7933) = 1 since 7933 = (-56)^2 + 69^2 + (-6)^2 with (-56) + 3*69 + 5*(-6) = 11^2.
a(14193) = 1 since 14193 = (-7)^2 + 112^2 + 40^2 with (-7) + 3*112 + 5*40 = 23^2.
		

Crossrefs

Programs

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

A283299 Number of ways to write 2*n + 1 as x^2 + 2*y^2 + 3*z^2 with x,y,z integers such that x + y + z is a square or twice a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 05 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 3, 6, 8, 17, 23, 41, 128, 197, 372, 764, 1143, 1893, 3761, 4307, 6408, 6918.
(ii) Any positive odd integer can be written as x^2 + y^2 + 2*z^2 with x,y,z integers such that x + 2*y + 3*z is a square or twice a square.
By Dickson's book in the reference, any positive odd integer can be written as x^2 + 2*y^2 + 3*z^2 (or x^2 + y^2 + 2*z^2) with x,y,z integers.
We have verified a(n) > 0 for all n = 0..10^6.
See also A283366 for a similar conjecture.

Examples

			a(0) = 1 since 2*0 + 1 = 1^2 + 2*0^2 + 3*0^2 with 1 + 0 + 0 = 1^2.
a(3) = 1 since 2*3 + 1 = 2^2 + 2*0^2 + 3*(-1)^2 with 2 + 0 + (-1) = 1^2.
a(8) = 1 since 2*8 + 1 = 3^2 + 2*(-2)^2 + 3*0^2 with 3 + (-2) + 0 = 1^2.
a(17) = 1 since 2*17 + 1 = 0^2 + 2*(-2)^2 + 3^2 with 0 + (-2) + 3 = 1^2.
a(41) = 1 since 2*41 + 1 = 9^2 + 2*(-1)^2 + 3*0^2 with 9 + (-1) + 0 = 2*2^2.
a(128) = 1 since 2*128 + 1 = 3^2 + 2*10^2 + 3*(-4)^2 with 3 + 10 + (-4) = 3^2.
a(197) = 1 since 2*197 + 1 = 12^2 + 2*(-2)^2 + 3*(-9)^2 with 12 + (-2) + (-9) = 1^2.
a(372) = 1 since 2*372 + 1 = 22^2 + 2*3^2 + 3*(-9)^2 with 22 + 3 + (-9) = 4^2.
a(764) = 1 since 2*764 + 1 = 18^2 + 2*(-23)^2 + 3*7^2 with 18 + (-23) + 7 = 2*1^2.
a(3761) = 1 since 2*3761 + 1 = (-57)^2 + 2*31^2 + 3*28^2 with (-57) + 31 + 28 = 2*1^2.
a(6408) = 1 since 2*6408 + 1 = (-22)^2 + 2*75^2 + 3*19^2 with (-22) + 75 + 19 = 2*6^2.
a(6918) = 1 since 2*6918 + 1 = 100^2 + 2*9^2 + 3*35^2 with 100 + 9 + 35 = 12^2.
		

References

  • L. E. Dickson, Modern Elementary Theory of Numbers, University of Chicago Press, Chicago, 1939. (See pages 112-113.)

Crossrefs

Programs

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

A283366 Number of ways to write 2*n + 1 as x^2 + y^2 + 2*z^2 with x,y,z integers such that 2*x + y + z is a square or a power of two.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 06 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 19, 32, 47, 115, 200, 974, 1271, 2240, 2549, 3185, 4865, 9254, 15881.
By the Gauss-Legendre theorem, for any nonnegative integer n, we can write 4*n + 2 as u^2 + v^2 + (2*z)^2 with u,v,z integers and u == v (mod 2), and hence 2*n + 1 = x^2 + y^2 + 2*z^2 with x = (u+v)/2 and y = (u-v)/2.
The conjecture implies that any positive integer with even 2-adic order can be written as x^2 + y^2 + 2*z^2 with x,y,z integers such that 2*x + y + z is a square or twice a square.
See also A283299 for a similar conjecture.

Examples

			a(0) = 2 since 2*0 + 1 = 1^2 + 0^2 + 2*0^2 with 2*1 + 0 + 0 = 2^1, and 2*0 + 1 = 0^2 + 1^2 + 2*0^2 with 2*0 + 1 + 0 = 1^2.
a(19) = 1 since 2*19 + 1 = 1^2 + 6^2 + 2*1^2 with 2*1 + 6 + 1 = 3^2.
a(32) = 1 since 2*32 + 1 = 4^2 + (-7)^2 + 2*0^2 with 2*4 + (-7) + 0 = 1^2.
a(47) = 1 since 2*47 + 1 = 6^2 + (-3)^2 + 2*(-5)^2 with 2*6 + (-3) + (-5) = 2^2.
a(115) = 1 since 2*115 + 1 = 10^2 + (-9)^2 + 2*5^2 with 2*10 + (-9) + 5 = 4^2.
a(200) = 1 since 2*200 + 1 = (-3)^2 + 0^2 + 2*14^2 with 2*(-3) + 0 + 14 = 2^3.
a(974) = 1 since 2*974 + 1 = 26^2 + (-25)^2 + 2*(-18)^2 with 2*26 + (-25) + (-18) = 3^2.
a(1271) = 1 since 2*1271 + 1 = 14^2 + 13^2 + 2*(-33)^2 with 2*14 + 13 + (-33) = 2^3.
a(2240) = 1 since 2*2240 + 1 = 28^2 + (-13)^2 + 2*(-42)^2 with 2*28 + (-13) + (-42) = 1^2.
a(2549) = 1 since 2*2549 + 1 = 59^2 + (-40)^2 + 2*3^2 with 2*59 + (-40) + 3 = 9^2.
a(3185) = 1 since 2*3185 + 1 = 33^2 + (-72)^2 + 2*7^2 with 2*33 + (-72) + 7 = 1^2.
a(4865) = 1 since 2*4865 + 1 = 72^2 + (-63)^2 + 2*(-17)^2 with 2*72 + (-63) + (-17) = 8^2.
a(9254) = 1 since 2*9254 + 1 = 61^2 + 26^2 + 2*(-84)^2 with 2*61 + 26 + (-84) = 8^2.
a(15881) = 1 since 2*15881 + 1 = (-48)^2 + 153^2 + 2*(-55)^2 with 2*(-48) + 153 + (-55) = 2^1.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Pow[n_]:=Pow[n]=n>0&&IntegerQ[Log[2,n]];
    TQ[n_]:=TQ[n]=SQ[n]||Pow[n];
    Do[r=0;Do[If[SQ[2n+1-2x^2-y^2]&&TQ[(-1)^i*x+(-1)^j*y+(-1)^k*2*Sqrt[2n+1-2x^2-y^2]],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[2n+1-2x^2]},{i,0,Min[x,1]},{j,0,Min[y,1]},{k,0,Min[Sqrt[2n+1-2x^2-y^2],1]}];Print[n," ",r],{n,0,80}]
Showing 1-3 of 3 results.