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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jul 22 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 5, 6, 7, 8, 11, 14, 15, 30, 78, 90, 93, 106, 111, 117, 125, 223, 335.
(ii) Any natural number can be written as x^2 + y^2 + z^2 + 2*w^3 with x,y,z,w nonnegative integers such that x + 2*y is a square.
See also A275344 for a similar conjecture.

Examples

			a(0) = 1 since 0 = 0^2 + 0^2 + 0^2 + 2*0^2 with 0 + 2*0 = 0^3.
a(2) = 2 since 2 = 1^2 + 0^2 + 1^2 + 2*0^2 with 1 + 2*0 =1^3, and 2 = 0^2 + 0^2 + 0^2 + 2*1^2 with 0 + 2*0 = 0^3.
a(5) = 1 since 5 = 1^2 + 0^2 + 2^2 + 2*0^2 with 1 + 2*0 = 1^3.
a(6) = 1 since 6 = 0^2 + 0^2 + 2^2 + 2*1^2 with 0 + 2*0 = 0^3.
a(7) = 1 since 7 = 1^2 + 0^2 + 2^2 + 2*1^2 with 1 + 2*0 = 1^3.
a(8) = 1 since 8 = 0^2 + 0^2 + 0^2 + 2*2^2 with 0 + 2*0 = 0^3.
a(11) = 1 since 11 = 0^2 + 0^2 + 3^2 + 2*1^2 with 0 + 2*0 = 0^3.
a(14) = 1 since 14 = 2^2 + 3^2 + 1^2 + 2*0^2 with 2 + 2*3 = 2^3.
a(15) = 1 since 15 = 2^2 + 3^2 + 0^2 + 2*1^2 with 2 + 2*3 = 2^3.
a(30) = 1 since 30 = 2^2 + 3^2 + 3^2 + 2*2^2 with 2 + 2*3 = 2^3.
a(78) = 1 since 78 = 6^2 + 1^2 + 3^2 + 2*4^2 with 6 + 2*1 = 2^3.
a(90) = 1 since 90 = 1^2 + 0^2 + 9^2 + 2*2^2 with 1 + 2*0 = 1^3.
a(93) = 1 since 93 = 4^2 + 2^2 + 1^2 + 2*6^2 with 4 + 2*2 = 2^3.
a(106) = 1 since 106 = 4^2 + 2^2 + 6^2 + 2*5^2 with 4 + 2*2 = 2^3.
a(111) = 1 since 111 = 2^2 + 3^2 + 0^2 + 2*7^2 with 2 + 2*3 = 2^3.
a(117) = 1 since 117 = 4^2 + 2^2 + 5^2 + 2*6^2 with 4 + 2*2 = 2^3.
a(125) = 1 since 125 = 6^2 + 1^2 + 4^2 + 2*6^2 with 6 + 2*1 = 2^3.
a(223) = 1 since 223 = 11^2 + 8^2 + 6^2 + 2*1^2 with 11 + 2*8 = 3^3.
a(335) = 1 since 335 = 11^2 + 8^2 + 10^2 + 2*5^2 with 11 + 2*8 = 3^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-2w^2-x^2-y^2]&&CQ[x+2*y],r=r+1],{w,0,(n/2)^(1/2)},{x,0,Sqrt[n-2w^2]},{y,0,Sqrt[n-2w^2-x^2]}];Print[n," ",r];Continue,{n,0,80}]

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 04 2017

Keywords

Comments

Conjecture: (i) For any nonnegative integer n not of the form 4^k*(8*m+7) (k,m = 0,1,2,...), we have a(n) > 0.
(ii) Any nonnegative integer not of the form 4^k*(8*m+7) (k,m = 0,1,2,...) can be written as x^2 + y^2 + z^2 with x,y,z integers such that a*x + b*y + c*z is a square or twice a square, whenever (a,b,c) is among the triples (1,2,5), (1,3,4), (1,4,7), (1,6,7), (2,3,4), (2,3,9), (3,4,7), (3,4,9).
The Gauss-Legendre theorem states 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*(8*m+7) with k and m nonnegative integers. Thus a(4^k*(8*m+7)) = 0 for all k,m = 0,1,2,..., and part (i) of our conjecture (verified for n up to 1.6*10^6) is stronger than the Gauss-Legendre theorem.
See also A283269 for a similar conjecture.

Examples

			a(82) = 1 since 82 = 0^2 + (-1)^2 + 9^2 with 0 + 2*(-1) + 3*9 = 5^2.
a(328) = 1 since 328 = 0^2 + (-2)^2 + 18^2 with 0 + 2*(-2) + 3*18 = 2*5^2.
a(330) = 1 since 330 = 5^2 + 4^2 + 17^2 with 5 + 2*4 + 3*17 = 8^2.
a(466) = 1 since 466 = 21^2 + 0^2 + 5^2 with 21 + 2*0 + 3*5 = 6^2.
a(1320) = 1 since 1320 = 10^2 + 8^2 + 34^2 with 10 + 2*8 + 3*34 = 2*8^2.
a(1387) = 1 since 1387 = 33^2  + (-17)^2 + 3^2 with 33 + 2*(-17) + 3*3 = 2*2^2.
a(1857) = 1 since 1857 = (-37)^2 + (-2)^2 + 22^2 with (-37) + 2*(-2) + 3*22 = 5^2.
a(1864) = 1 since 1864 = 42^2 + 0^2 + 10^2 with 42 + 2*0 + 3*10 = 2*6^2.
a(2386) = 1 since 2386 = (-44)^2 + 3^2 + 21^2 with (-44) + 2*3 + 3*21 = 5^2.
a(5548) = 1 since 5548 = 66^2 + (-34)^2 + 6^2 with 66 + 2*(-34) + 3*6 = 4^2.
a(7428) = 1 since 7428 = (-74)^2 + (-4)^2 + 44^2 with (-74) + 2*(-4) + 3*44 = 2*5^2.
a(9544) = 1 since 9544 = (-88)^2 + 6^2 + 42^2 with (-88) + 2*6 + 3*42 = 2*5^2.
		

Crossrefs

Programs

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

A306606 Number of ways to write n as w^2 + T(x)^2 + Pen(y)^2 + 2*Pen(z)^2, where w,x,y,z are integers with w > 0 and x >= 0, and T(m) = m*(m+1)/2 and Pen(m) = m*(3m-1)/2.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 28 2019

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. In other words, any positive integer n can be written as s^2 + t^2 + u^2 + 2*v^2, where s is a positive integer, t is a triangular number, u and v are generalized pentagonal numbers.
I have verified a(n) > 0 for all n = 1..5*10^6.
It is well known that any positive odd integer can be written as x^2 + y^2 + 2*z^2 with x,y,z integers.
See also A306614 for similar conjectures.

Examples

			a(1) = 1 with 1 = 1^2 + T(0)^2 + Pen(0)^2 + 2*Pen(0)^2.
a(23) = 1 with 23 = 4^2 + T(1)^2 + Pen(-1)^2 + 2*Pen(1)^2.
a(335) = 1 with 335 = 18^2 + T(2)^2 + Pen(0)^2 + 2*Pen(1)^2.
a(3695) = 1 with 3695 = 53^2 + T(7)^2 + Pen(-1)^2 + 2*Pen(-2)^2.
		

Crossrefs

Programs

  • Mathematica
    t[x_]:=t[x]=x(x+1)/2; p[x_]:=p[x]=x(3x-1)/2;
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[SQ[n-t[x]^2-p[y]^2-2*p[z]^2],r=r+1],{x,0,(Sqrt[8*Sqrt[n-1]+1]-1)/2},{y,-Floor[(Sqrt[24*Sqrt[n-1-t[x]^2]+1]-1)/6],(Sqrt[24*Sqrt[n-1-t[x]^2]+1]+1)/6},
    {z,-Floor[(Sqrt[24*Sqrt[(n-1-t[x]^2-p[y]^2)/2]+1]-1)/6],(Sqrt[24*Sqrt[(n-1-t[x]^2-p[y]^2)/2]+1]+1)/6}];tab=Append[tab,r],{n,1,100}];Print[tab]

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jul 26 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 except for n = 3, 10, and a(n) = 1 only for n = 0, 2, 7, 8, 9, 12, 14, 15, 22, 23, 24, 25, 36, 39, 44, 45, 60, 87, 98, 106, 110, 111, 183.
(ii) Any natural number can be written as x^2 + y^2 + z^2 + 2*w^2 with x,y,z,w nonnegative integers such that x + 2*y + 3*z - 3*w is a square.
(iii) For each triple (a,b,c) = (1,2,1), (1,2,3), (1,3,1), (2,4,1), (2,4,2), (2,4,3), (2,4,4), (2,4,8), (8,9,5), any natural number can be written as x^2 + y^2 + z^2 + 2*w^2 with x,y,z,w nonnegative integers such that a*x + b*y - c*z is a square.
(iv) Any natural number can be written as x^2 + y^2 + z^2 + 2*w^2 with x,y,z,w nonnegative integers such that x + 2*y - 2*z is twice a nonnegative cube. Also, each natural number can be written as x^2 + y^2 + z^2 + 2*w^3 with x,y,z,w nonnegative integers such that x + 3*y - z is a square.
See also A275344 and A275301 for related conjectures. We are able to show that each natural number can be written as x^2 + y^2 + z^2 + 2*w^2 with x,y,z,w integers such that x + y + z = t^2 for some t = 0, 1, 2.

Examples

			a(2) = 1 since 2 = 2*1^2 + 0^2 + 0^2 + 0^2 with 1 + 0 + 2*0 + 4*0 = 1^2.
a(7) = 1 since 7 = 2*1^2 + 0^2 + 2^2 + 1^2 with 1 + 0 + 2*2 + 4*1 = 3^2.
a(8) = 1 since 8 = 2*1^2 + 2^2 + 1^2 + 1^2 with 1 + 2 + 2*1 + 4*1 = 3^2.
a(9) = 1 since 9 = 2*2^2 + 0^2 + 1^2 + 0^2 with 2 + 0 + 2*1 + 4*0 = 2^2.
a(12) = 1 since 12 = 2*2^2 + 2^2 + 0^2 + 0^2 with 2 + 2 + 2*0 + 4*0 = 2^2.
a(14) = 1 since 14 = 2*0^2 + 2^2 + 1^2 + 3^2 with 0 + 2 + 2*1 + 4*3 = 4^2.
a(15) = 1 since 15 = 2*1^2 + 2^2 + 3^2 + 0^2 with 1 + 2 + 2*3 + 4*0 = 3^2.
a(22) = 1 since 22 = 2*1^2 + 4^2 + 2^2 + 0^2 with 1 + 4 + 2*2 + 4*0 = 3^2.
a(23) = 1 since 23 = 2*3^2 + 2^2 + 0^2 + 1^2 with 3 + 2 + 2*0 + 4*1 = 3^2.
a(24) = 1 since 24 = 2*0^2 + 4^2 + 2^2 + 2^2 with 0 + 4 + 2*2 + 4*2 = 4^2.
a(25) = 1 since 25 = 2*0^2 + 4^2 + 0^2 + 3^2 with 0 + 4 + 2*0 + 4*3 = 4^2.
a(36) = 1 since 36 = 2*3^2 + 1^2 + 4^2 + 1^2 with 3 + 1 + 2*4 + 4*1 = 4^2.
a(39) = 1 since 39 = 2*1^2 + 6^2 + 1^2 + 0^2 with 1 + 6 + 2*1 + 4*0 = 3^2.
a(44) = 1 since 44 = 2*3^2 + 0^2 + 1^2 + 5^2 with 3 + 0 + 2*1 + 4*5 = 5^2.
a(45) = 1 since 45 = 2*0^2 + 5^2 + 2^2 + 4^2 with 0 + 5 + 2*2 + 4*4 = 5^2.
a(60) = 1 since 60 = 2*2^2 + 6^2 + 4^2 + 0^2 with 2 + 6 + 2*4 + 4*0 = 4^2.
a(87) = 1 since 87 = 2*3^2 + 2^2 + 8^2 + 1^2 with 3 + 2 + 2*8 + 4*1 = 5^2.
a(98) = 1 since 98 = 2*4^2 + 1^2 + 8^2 + 1^2 with 4 + 1 + 2*8 + 4*1 = 5^2.
a(106) = 1 since 106 = 2*2^2 + 8^2 + 3^2 + 5^2 with 2 + 8 + 2*3 + 4*5 = 6^2.
a(110) = 1 since 110 = 2*6^2 + 5^2 + 3^2 + 2^2 with 6 + 5 + 2*3 + 4*2 = 5^2.
a(111) = 1 since 111 = 2*5^2 + 3^2 + 6^2 + 4^2 with 5 + 3 + 2*6 + 4*4 = 6^2.
a(183) = 1 since 183 = 2*3^2 + 10^2 + 4^2 + 7^2 with 3 + 10 + 2*4 + 4*7 = 7^2.
		

Crossrefs

Programs

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

A308934 Number of ways to write n as (2^a*3^b)^2 + (2^c*3^d)^2 + x^2 + 2*y^2, where a,b,c,d,x,y are nonnegative integers with 2^a*3^b >= 2^c*3^d.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jul 01 2019

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 1.
Conjecture 2: Any integer n > 1 can be written as (2^a*3^b)^2 + (2^c*5^d)^2 + x^2 + 2*y^2 with a,b,c,d,x,y nonnegative integers.
These two conjectures are similar to the Four-square Conjecture in A308734. We have verified Conjectures 1 and 2 for n up to 2*10^9 and 10^9 respectively.

Examples

			a(3) = 1 with 3 = 1^2 + 1^2 + 1^2 + 2*0^2.
a(7) = 1 with 7 = 2^2 + 1^2 + 0^2 + 2*1^2.
a(15) = 1 with 15 = 3^2 + 2^2 + 0^2 + 2*1^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[SQ[n-4^a*9^b-4^c*9^d-2x^2],r=r+1],{a,0,Log[4,n]},{b,0,Ceiling[Log[9,n/4^a]]-1},
    {c,0,Log[4,n-4^a*9^b]},{d,0,Log[9,Min[4^(a-c)*9^b,(n-4^a*9^b)/4^c]]},{x,0,Sqrt[(n-4^a*9^b-4^c*9^d)/2]}];tab=Append[tab,r],{n,1,100}];Print[tab]

A338263 Number of ways to write 8*n+7 as 2*w^2 + x^2 + y^2 + z^2 with w, x, y, z nonnegative integers such that w*(3*x+7*y+10*z) is a square and also one of w, x, y, z is a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 27 2020

Keywords

Comments

Conjecture 1: Each nonnegative integer can be written as 2*w^2 + x^2 + y^2 + z^2 with w, x, y, z nonnegative integers such that w*(3*x+7*y+10*z) is a square and one of w, x, y, z is also a square.
As all the nonnegative integers not of the form 4^k*(8*m+7) (k>=0, m>=0) can be written as 2*0^2 + x^2 + y^2 + z^2 with x, y, z integers, Conjecture 1 has the following equivalent version: a(n) > 0 for all n = 0,1,...
We have verified that a(n) > 0 for all n = 0..10^5.
Conjecture 2: If (a,b) is among the ordered pairs (1,2), (1,3), (2,4), (2,5), (2,8), (2,24), (6,8), (6,32), (9,12) and (18,24), then each n = 0,1,... can be written as 2*w^2 + x^2 + y^2 + z^2 with w, x, y, z nonnegative integers such that w*(a*x+b*y) is a square.

Examples

			a(7) = 1, and 8*7+7 = 63 = 2*3^2 + 6^2 + 0^2 + 3^2 with 0 = 0^2 and 3*(3*6+7*0+10*3) = 12^2.
a(11) = 1, and 8*11+7 = 95 = 2*1^2 + 2^2 + 5^2 + 8^2 with 1 = 1^2 and 1*(3*2+7*5+10*8) = 11^2.
a(15) = 1, and 8*15+7 = 127 = 2*7^2 + 3^2 + 2^2 + 4^2 with 4 = 2^2 and 7*(3*3+7*2+10*4) = 21^2.
a(64) = 1, and 8*64+7 = 519 = 2*3^2 + 1^2 + 20^2 + 10^2 with 1 = 1^2 and 3*(3*1+7*20+10*10) = 27^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[SQ[8n+7-2w^2-x^2-y^2]&&(SQ[w]||SQ[x]||SQ[y]||SQ[8n+7-2w^2-x^2-y^2])&&SQ[w(3x+7y+10*Sqrt[8n+7-2w^2-x^2-y^2])],r=r+1],{w,0,Sqrt[4n+3]},{x,0,Sqrt[8n+7-2w^2]},{y,0,Sqrt[8n+7-2w^2-x^2]}];tab=Append[tab,r],{n,0,80}];tab
Showing 1-6 of 6 results.