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.

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 11 2018

Keywords

Comments

Conjecture: 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, 1, 3, 7, 21, 24, 46, 79, 88, 94, 142, 151, 184, 190, 193, 280, 286, 1336.
By the author's 2017 JNT paper, any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2*(x-y) (or x) is a square.
See also A281976, A300666, A300667 and A300708 for similar conjectures.
a(n) > 0 for all n = 0..10^8. - Zhi-Wei Sun, Oct 04 2020

Examples

			a(21) = 1 since 21 = 2^2 + 0^2 + 1^2 + 4^2 with 0 = 0^2 and 2 - 0 = 2*1^2.
a(79) = 1 since 79 = 3^2 + 3^2 + 5^2 + 6^2 with 3*3 = 3^2 and 3 - 3 = 2*0^2.
a(142) = 1 since 142 = 6^2 + 4^2 + 3^2 + 9^2 with 4 = 2^2 and 6 - 4 = 2*1^2.
a(190) = 1 since 190 = 3^2 + 1^2 + 6^2 + 12^2 with 1 = 1^2 and 3 - 1 = 2*1^2.
a(193) = 1 since 193 = 0^2 + 0^2 + 7^2 + 12^2 with 0 = 0^2 and 0 - 0 = 2*0^2.
a(280) = 1 since 280 = 12^2 + 10^2 + 0^2 + 6^2 with 3*12 = 6^2 and 12 - 10 = 2*1^2.
a(1336) = 1 since 1336 = 2^2 + 0^2 + 6^2 + 36^2 with 0 = 0^2 and 2 - 0 = 2*1^2.
		

Crossrefs

Programs

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