The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A300667 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 3*x or y is a square and x + 2*y is also a square. 15
 1, 2, 2, 1, 2, 4, 3, 1, 2, 4, 3, 1, 1, 3, 3, 1, 2, 5, 6, 3, 4, 5, 4, 2, 2, 5, 6, 3, 1, 4, 5, 2, 2, 4, 5, 3, 4, 4, 3, 1, 2, 6, 5, 3, 2, 4, 3, 1, 1, 3, 7, 4, 4, 5, 7, 4, 2, 4, 5, 3, 1, 2, 3, 3, 2, 6, 8, 4, 7, 7, 5, 1, 3, 4, 4, 4, 3, 4, 3, 3, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 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, 3, 7, 11, 12, 15, 28, 39, 47, 60, 71, 92, 119, 172, 232, 253, 263, 316, 347, 515. Conjecture 2: Each n = 0,1,2,... can be written 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 2*x - y is also 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, A300708 and A300712 for similar conjectures. LINKS Zhi-Wei Sun, Table of n, a(n) for n = 0..10000 Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190. Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017-2018. EXAMPLE a(12) = 1 since 12 = 0^2 + 2^2 + 2^2 + 2^2 with 3*0 = 0^2 and 0 + 2*2 = 2^2. a(39) = 1 since 39 = 2^2 + 1^2 + 3^2 + 5^2 with 1 = 1^2 and 2 + 2*1 = 2^2. a(172) = 1 since 172 = 7^2 + 1^2 + 1^2 + 11^2 with 1 = 1^2 and 7 + 2*1 = 3^2. a(232) = 1 since 232 = 0^2 + 0^2 + 6^2 + 14^2 with 0 = 0^2 and 0 + 2*0 = 0^2. a(253) = 1 since 253 = 8^2 + 4^2 + 2^2 + 13^2 with 4 = 2^2 and 8 + 2*4 = 4^2. a(263) = 1 since 263 = 3^2 + 3^2 + 7^2 + 14^2 with 3*3 = 3^2 and 3 + 2*3 = 3^2. a(515) = 1 since 515 = 1^2 + 0^2 + 15^2 + 17^2 with 0 = 0^2 and 1 + 2*0 = 1^2. MATHEMATICA SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; tab={}; Do[r=0; Do[If[(SQ[3(m^2-2y)]||SQ[y])&&SQ[n-(m^2-2y)^2-y^2-z^2], r=r+1], {m, 0, (5n)^(1/4)}, {y, 0, Min[m^2/2, Sqrt[n]]}, {z, 0, Sqrt[Max[0, (n-(m^2-2y)^2-y^2)/2]]}]; tab=Append[tab, r], {n, 0, 80}]; Print[tab] PROG (PARI) A300667(n)=sum(x=0, sqrtint(n), sum(y=0, sqrtint(n-x^2), if(issquare(x+2*y)&&(issquare(y)||issquare(3*x)), if(n>x^2+y^2, A000161(n-x^2-y^2), 1)))) \\ M. F. Hasler, Mar 11 2018 CROSSREFS Cf. A000118, A000290, A271518, A281976, A300666, A300708, A300712. Sequence in context: A294931 A193292 A275297 * A129687 A274742 A128176 Adjacent sequences:  A300664 A300665 A300666 * A300668 A300669 A300670 KEYWORD nonn AUTHOR Zhi-Wei Sun, Mar 10 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 23 04:16 EST 2020. Contains 331168 sequences. (Running on oeis4.)