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.

A282542 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x + 3*y + 5*z and (at least) one of y,z,w are squares.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 17 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n = 0,1,2,....
This is stronger than the 1-3-5 conjecture (cf. A271518).
By the linked JNT paper, any nonnegative integer can be expressed as the sum of a fourth power and three squares.

Examples

			a(12) = 1 since 12 = 1^2 + 1^2 + 1^2 + 3^2 with 1 + 3*1 + 5*1 = 3^2 and 1 = 1^2.
a(28) = 1 since 28 = 1^2 + 1^2 + 1^2 + 5^2 with 1 + 3*1 + 5*1 = 3^2 and 1 = 1^2.
a(47) = 1 since 47 = 3^2 + 1^2 + 6^2 + 1^2 with 3 + 3*1 + 5*6 = 6^2 and 1 = 1^2.
a(92) = 1 since 92 = 1^2 + 1^2 + 9^2 + 3^2 with 1 + 3*1 + 5*1 = 3^2 and 9 = 3^2.
a(188) = 1 since 188 = 7^2 + 9^2 + 3^2 + 7^2 with 7 + 3*9 + 5*3 = 7^2 and 9 = 3^2.
a(248) = 1 since 248 = 10^2 + 2^2 + 0^2 + 12^2 with 10 + 3*2 + 5*0 = 4^2 and 0 = 0^2.
a(388) = 1 since 388 = 13^2 + 1^2 + 13^2 + 7^2 with 13 + 3*1 + 5*13 = 9^2 and 1 = 1^2.
		

Crossrefs

Programs

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