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.

A300666 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with nonnegative integers x,y,z,w and z <= w such that x or 2*y is a square and x + 3*y is also a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 10 2018

Keywords

Comments

Conjecture 1: a(n) > 0 for all n = 0,1,2,....
Conjecture 2: Any nonnegative integer n not equal to 3 can be written as x^2 + y^2 + z^2 + w^2 with nonnegative integers x,y,z,w such that x or 2*y is a square and 3*x - y is also a square.
By the author's 2017 JNT paper, each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with integers x,y,z,w such that x (or 2*x) is a square.
See also A281976, A300667, A300708 and A300712 for similar conjectures.
a(n) > 0 for all n = 0..10^8. - Zhi-Wei Sun, Oct 04 2020

Examples

			a(8) = 1 since 8 = 0^2 + 0^2 + 2^2 + 2^2 with 0 = 0^2 and 0 + 3*0 = 0^2.
a(23) = 1 since 23 = 3^2 + 2^2 + 1^2 + 3^2 with 2*2 = 2^2 and 3 + 3*2 = 3^2.
a(56) = 1 since 56 = 4^2 + 0^2 + 2^2 + 6^2 with 4 = 2^2 and 4 + 3*0 = 2^2.
a(140) = 1 since 140 = 10^2 + 2^2 + 0^2 + 6^2 with 2*2 = 2^2 and 10 + 3*2 = 4^2.
a(472) = 1 since 472 = 0^2 + 12^2 + 2^2 + 18^2 with 0 = 0^2 and 0 + 3*12 = 6^2.
a(959) = 1 since 959 = 9^2 + 9^2 + 11^2 + 26^2 with 9 = 3^2 and 9 + 3*9 = 6^2.
a(1839) = 1 since 1839 = 1^2 + 5^2 + 7^2 + 42^2 with 1 = 1^2 and 1 + 3*5 = 4^2.
		

Crossrefs

Programs

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