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.

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

Original entry on oeis.org

1, 2, 3, 2, 2, 3, 3, 2, 1, 3, 4, 2, 1, 2, 2, 2, 2, 3, 5, 2, 3, 3, 2, 1, 1, 5, 6, 5, 2, 3, 5, 3, 3, 4, 7, 3, 5, 4, 3, 3, 2, 8, 8, 4, 1, 6, 4, 1, 2, 3, 9, 7, 6, 3, 5, 4, 1, 6, 5, 3, 2, 5, 3, 3, 2, 5, 11, 4, 3, 4, 5, 1, 2, 5, 5, 6, 3, 5, 4, 2, 3
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, 8, 12, 23, 24, 44, 47, 56, 71, 79, 92, 95, 140, 168, 184, 248, 344, 428, 568, 632, 1144, 1544.
By the author's 2017 JNT paper, each nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x - y (or x) is a square.
See also A281976, A300666, A300667 and A300712 for similar conjectures.
a(n) > 0 for all n = 0..10^8. - Zhi-Wei Sun, Oct 04 2020

Examples

			a(71) = 1 since 71 = 5^2 + 1^2 + 3^2 + 6^2 with 1 = 1^2 and 5 - 1 = 2^2.
a(95) = 1 since 95 = 2^2 + 1^2 + 3^2 + 9^2 with 1 = 1^2 and 2 - 1 = 1^2.
a(344) = 1 since 344 = 4^2 + 0^2 + 2^2 + 18^2 with 4 = 2^2 and 4 - 0 = 2^2.
a(428) = 1 since 428 = 13^2 + 9^2 + 3^2 + 13^2 with 9 = 3^2 and 13 - 9 = 2^2.
a(632) = 1 since 632 = 16^2 + 12^2 + 6^2 + 14^2 with 16 = 4^2 and 16 - 12 = 2^2.
a(1144) = 1 since 1144 = 20^2 + 16^2 + 2^2 + 22^2 with 16 = 4^2 and 20 - 16 = 2^2.
a(1544) = 1 since 1544 = 0^2 + 0^2 + 10^2 + 38^2 with 0 = 0^2 and 0 - 0 = 0^2.
		

Crossrefs

Programs

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