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 11-15 of 15 results.

A301304 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x >= y >= 0 <= z <= w such that x^2 + 7*y^2 = 2^k*m for some k = 0,1,2 and m = 1,2,3,....

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 17 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
We have verified this for n up to 10^8.
See also A301303 and A301314 for similar conjectures.

Examples

			a(79) = 1 since 79 = 5^2 + 1^2 + 2^2 + 7^2 with 5^2 + 7*1^2 = 2^2*2^3.
a(323) = 1 since 323 = 3^2 + 1^2 + 12^2 + 13^2 with 3^2 + 7*1^2 = 2*2^3.
a(646) = 1 since 646 = 22^2 + 11^2 + 4^2 + 5^2 with 22^2 + 7*11^2 = 11^3.
a(815) = 1 since 815 = 9^2 + 5^2 + 15^2 + 22^2 with 9^2 + 7*5^2 = 2^2*4^3.
a(1111) = 1 since 1111 = 1^2 + 1^2 + 22^2 + 25^2 with 1^2 + 7*1^2 = 2^3.
a(2822) = 1 since 2822 = 2^2 + 0^2 + 3^2 + 53^2 with 2^2 + 7*0^2 = 2^2*1^3.
		

Crossrefs

Programs

  • Mathematica
      SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    CQ[n_]:=CQ[n]=IntegerQ[n^(1/3)];
    QQ[n_]:=n>0&&(CQ[n]||CQ[n/2]||CQ[n/4]);
    tab={};Do[r=0;Do[If[QQ[x^2+7y^2],Do[If[SQ[n-x^2-y^2-z^2],r=r+1],{z,0,Sqrt[(n-x^2-y^2)/2]}]],{y,0,Sqrt[n/2]},{x,y,Sqrt[n-y^2]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A301314 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 + 3*y + 9*z = 2^k*m^3 for some k,m = 0,1,2,....

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 18 2018

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 0.
Conjecture 2: Any positive integer can be written as x^2 + y^2 + z^2 + w^2, where x is a positive integer and y,z,w are nonnegative integers such that 2*x + 7*y = 2^k*m^3 for some k = 0,1,2 and m = 1,2,3,....
We have verified a(n) > 0 for all n = 1..10^7.
See also A301303 and A301304 for similar conjectures.

Examples

			a(7) = 1 since 7 = 1^2 + 2^2 + 1^2 + 1^2 with 1 + 3*2 + 9*1 = 2*2^3.
a(19) = 1 since 19 = 4^2 + 1^2 + 1^2 + 1^2 with 4 + 3*1 + 9*1 = 2*2^3.
a(46) = 1 since 46 = 0^2 + 6^2 + 1^2 + 3^2 with 0 + 3*6 + 9*1 = 3^3.
a(79) = 1 since 79 = 2^2 + 7^2 + 1^2 + 5^2 with 2 + 3*7 + 9*1 = 2^2*2^3.
a(125) = 1 since 125 = 2^2 + 0^2 + 0^2 + 11^2 with 2 + 3*0 + 9*0 = 2*1^3.
a(736) = 1 since 736 = 0^2 + 24^2 + 4^2 + 12^2 with 0 + 3*24 + 9*4 = 2^2*3^3.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    CQ[n_]:=CQ[n]=IntegerQ[n^(1/3)];
    QQ[n_]:=CQ[n]||CQ[n/2]||CQ[n/4];
    tab={};Do[r=0;Do[If[QQ[x+3y+9z]&&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]

A300139 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with 4*x - 3*y a square, where x,y,z,w are nonnegative integers with z <= w such that 10*x or y is a square.

Original entry on oeis.org

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

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 = 0, 7, 8, 13, 22, 23, 24, 31, 44, 56, 71, 79, 88, 109, 120, 152, 184, 472, 1912, 6008, 9080.
Conjecture 2: Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with 3*x - y twice a square, where x,y,z,w are nonnegative integers such that 5*x or y is a square.
By the author's 2017 JNT paper, any nonnegative integer can be written as the sum of a fourth power and three squares.
See also A281976, A300666, A300667, A300708 and A300712 for similar conjectures.
a(n) > 0 for all n = 0..10^8. Also, Conjecture 2 holds for all n = 0..10^8. - Zhi-Wei Sun, Oct 05 2020

Examples

			a(22) = 1 since 22 = 1^2 + 1^2 + 2^2 + 4^2 with 1 = 1^2 and 4*1 - 3*1 = 1^2.
a(23) = 1 since 23 = 3^2 + 1^2 + 2^2 + 3^2 with 1 = 1^2 and 4*3 - 3*1 = 3^2.
a(109) = 1 since 109 = 0^2 + 0^2 + 3^2 + 10^2 with 0 = 0^2 and 4*0 - 3*0 = 0^2.
a(184) = 1 since 184 = 10^2 + 8^2 + 2^2 + 4^2 with 10*10 = 10^2 and 4*10 - 3*8 = 4^2.
a(6008) = 1 since 6008 = 12^2 + 16^2 + 42^2 + 62^2 with 16 = 4^2 and 4*12 - 3*16 = 0^2.
a(9080) = 1 since 9080 = 10^2 + 12^2 + 0^2 + 94^2 with 10*10 = 10^2 and 4*10 - 3*12 = 2^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[Mod[m^2+3y,4]==0&&(SQ[10(m^2+3y)/4]||SQ[y]), Do[If[SQ[n-((m^2+3y)/4)^2-y^2-z^2],r=r+1],{z,0,Sqrt[Max[0,(n-((m^2+3y)/4)^2-y^2)/2]]}]],{m,0,2n^(1/4)},{y,0,4/5*Sqrt[n-m^4/16]}];tab=Append[tab,r],{n,0,80}];Print[tab]

A301375 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z nonnegative integers and w a positive integer such that x*(y+3*z) is a cube or half a cube and y <= z <= w if x = 0.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 19 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
We have verified this for all n = 1..3*10^6.

Examples

			a(14) = 1 since 14 = 0^2 + 1^2 + 2^2 + 3^2 with 0*(1+3*2) = 0^3.
a(15) = 1 since 15 = 2^2 + 1^2 + 1^2 + 3^2 with 2*(1+3*1) = 2^3.
a(16) = 1 since 16 = 0^2 + 0^2 + 0^2 + 4^2 with 0*(0+3*0) = 0^3.
a(60) = 1 since 60 = 4^2 + 2^2 + 2^2 + 6^2 with 4*(2+3*2) = 4^3/2.
a(92) = 1 since 92 = 6^2 + 6^2 + 4^2 + 2^2 with 6*(6+3*4) = 6^3/2.
a(240) = 1 since 240 = 2^2 + 14^2 + 6^2 + 2^2 with 2*(14+3*6) = 4^3.
a(807) = 1 since 807 = 1^2 + 21^2 + 2^2 + 19^2 with 1*(21+3*2) = 3^3.
		

Crossrefs

Programs

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

A350021 Number of ways to write n as w^4 + x^2 + y^2 + z^2 with x - y a power of two (including 2^0 = 1).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 08 2021

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
This is a new refinement of Lagrange's four-square theorem, and we have verified it for n up to 10^6.
If x - y = 2^k, then x^2 + y^2 = ((x+y)^2 + (2^k)^2)/2 and x + y >= 2^k. So the above conjecture implies the conjecture in A349661.
In his 2017 JNT paper, the author proved that each n = 0,1,2,... can be written as w^4 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers.
In his 2019 IJNT paper, the author proved that any positive integer can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers such that x - y is a power of two (including 2^0 = 1).

Examples

			a(3) = 1 with 3 = 1^4 + 1^2 + 0^2 + 1^2 and 1 - 0 = 2^0.
a(4) = 1 with 4 = 0^4 + 2^2 + 0^2 + 0^2 and  2 - 0 = 2^1.
a(7) = 1 with 7 = 1^4 + 2^2 + 1^2 + 1^2 and 2 - 1 = 2^0.
a(8) = 1 with 8 = 0^4 + 2^2 + 0^2 + 2^2 and 2 - 0 = 2^1.
a(12) = 1 with 12 = 1^4 + 3^2 + 1^2 + 1^2 and 3 - 1 = 2^1.
a(19) = 1 with 19 = 0^4 + 3^2 + 1^2 + 3^2 and 3 - 1 = 2^1.
a(28) = 1 with 28 = 1^4 + 5^2 + 1^2 + 1^2 and 5 - 1 = 2^2.
a(47) = 1 with 47 = 1^4 + 3^2 + 1^2 + 6^2 and 3 - 1 = 2^1.
a(55) = 1 with 55 = 1^4 + 2^2 + 1^2 + 7^2 and 2 - 1 = 2^0.
a(88) = 1 with 88 = 0^4 + 6^2 + 4^2 + 6^2 and 6 - 4 = 2^1.
a(103) = 1 with 103 = 3^4 + 3^2 + 2^2 + 3^2 and 3 - 2 = 2^0.
a(193) = 1 with 193 = 2^4 + 8^2 + 7^2 + 8^2 and 8 - 7 = 2^0.
a(439) = 1 with 439 = 3^4 + 5^2 + 3^2 + 18^2 and 5 - 3 = 2^1.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    PowQ[n_]:=PowQ[n]=IntegerQ[Log[2,n]];
    tab={};Do[r=0;Do[If[SQ[n-w^4-x^2-y^2]&&PowQ[y-x],r=r+1],{w,0,(n-1)^(1/4)},{x,0,Sqrt[(n-w^4)/2]},{y,x+1,Sqrt[n-w^4-x^2]}];tab=Append[tab,r],{n,1,100}];Print[tab]
Previous Showing 11-15 of 15 results.