

A300666


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 2*y is a square and x + 3*y is also a square.


15



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


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 x,y,z,w nonnegative integers 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 x,y,z,w integers such that x (or 2*x) is a square.
See also A281976, A300667, A300708 and A300712 for similar conjectures.


LINKS

ZhiWei Sun, Table of n, a(n) for n = 0..10000
ZhiWei Sun, Refining Lagrange's foursquare theorem, J. Number Theory 175(2017), 167190.
ZhiWei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 20172018.


EXAMPLE

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.


MATHEMATICA

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


CROSSREFS

Cf. A000118, A000290, A271518, A281976, A300667, A300708, A300712.
Sequence in context: A090387 A030329 A300139 * A120881 A297930 A031217
Adjacent sequences: A300663 A300664 A300665 * A300667 A300668 A300669


KEYWORD

nonn


AUTHOR

ZhiWei Sun, Mar 10 2018


STATUS

approved



