

A270073


Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x*y + 2*z*w a square, where x,y,z are nonnegative integers and w is an integer with x <= y and z >= w.


19



1, 2, 2, 1, 2, 3, 2, 2, 2, 4, 3, 1, 2, 3, 1, 1, 2, 4, 4, 2, 4, 4, 2, 1, 2, 5, 4, 3, 2, 3, 3, 2, 2, 4, 3, 1, 4, 4, 3, 4, 3, 4, 3, 1, 2, 7, 2, 3, 2, 4, 5, 2, 4, 4, 6, 4, 1, 3, 2, 2, 3, 6, 1, 4, 2, 8, 4, 1, 5, 7, 4, 3, 4, 7, 3, 4, 2, 3, 2, 1, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 3, 11, 15, 23, 43, 67, 79, 155, 211, 331, 347, 403, 427, 659, 899, 1443, 1955, 2^k*m (k = 0,1,2,... and m = 14, 35, 62, 158, 382).
(ii) Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x*y + z*w/2 a square, where x,y,z are nonnegative integers and w is an integer with 2  z*w and x <= y >= w <= z.
We have verified that a(n) > 0 for all n = 0,...,10^5.
For more refinements of Lagrange's foursquare theorem, see arXiv:1604.06723.


LINKS

ZhiWei Sun, Table of n, a(n) for n = 0..10000
ZhiWei Sun, Refining Lagrange's foursquare theorem, arXiv:1604.06723 [math.GM], 2016.
ZhiWei Sun, Refine Lagrange's foursquare theorem, a message to Number Theory List, April 26, 2016.


EXAMPLE

a(3) = 1 since 3 = 1^2 + 1^2 + 1^2 + 0^2 with 1 = 1, 1 > 0 and 1*1 + 2*1*0 = 1^2.
a(11) = 1 since 11 = 1^2 + 1^2 + 3^2 + 0^2 with 1 = 1, 3 > 0 and 1*1 + 2*3*0 = 1^2.
a(14) = 1 since 14 = 0^2 + 3^2 + 2^2 + 1^2 with 0 < 3, 2 > 1 and 0*3 + 2*2*1 = 2^2.
a(15) = 1 since 15 = 2^2 + 3^2 + 1^2 + (1)^2 with 2 < 3, 1 = 1 and 2*3 + 2*1*(1) = 2^2.
a(23) = 1 since 23 = 2^2 + 3^2 + 3^2 + (1)^2 with 2 < 3, 3 > 1 and 2*3 + 2*3*(1) = 0^2.
a(35) = 1 since 35 = 3^2 + 3^2 + 4^2 + (1)^2 with 3 = 3, 4 > 1 and 3*3 + 2*4*(1) = 1^2.
a(43) = 1 since 43 = 3^2 + 3^2 + 5^2 + 0^2 with 3 = 3, 5 > 0 and 3*3 + 2*5*0 = 3^2.
a(62) = 1 since 62 = 3^2 + 4^2 + 6^2 + (1)^2 with 3 < 4, 6 > 1 and 3*4 + 2*6*(1) = 0^2.
a(67) = 1 since 67 = 3^2 + 3^2 + 7^2 + 0^2 with 3 = 3, 7 > 0 and 3*3 + 2*7*0 = 3^2.
a(79) = 1 since 79 = 2^2 + 7^2 + 5^2 + (1)^2 with 2 < 7, 5 > 1 and 2*7 + 2*5*(1) = 2^2.
a(155) = 1 since 155 = 3^2 + 11^2 + 4^2 + (3)^2 with 3 < 11, 4 > 3 and 3*11 + 2*4*(3) = 3^2.
a(158) = 1 since 158 = 1^2 + 12^2 + 3^2 + (2)^2 with 1 < 12, 3 > 2 and 1*12 + 2*3*(2) = 0^2.
a(211) = 1 since 211 = 9^2 + 9^2 + 7^2 + 0^2 with 9 = 9, 7 > 0 and 9*9 + 2*7*0 = 9^2.
a(331) = 1 since 331 = 9^2 + 9^2 + 13^2 + 0^2 with 9 = 9, 13 > 0 and 9*9 + 2*13*0 = 9^2.
a(347) = 1 since 347 = 13^2 + 13^2 + 3^2 + 0^2 with 13 = 13, 3 > 0 and 13*13 + 2*3*0 = 13^2.
a(382) = 1 since 382 = 5^2 + 16^2 + 10^2 + 1^2 with 5 < 16, 10 > 1 and 5*16 + 2*10*1 = 10^2.
a(403) = 1 since 403 = 13^2 + 13^2 + 7^2 + 4^2 with 13 = 13, 7 > 4 and 13*13 + 2*7*4 = 15^2.
a(427) = 1 since 427 = 11^2 + 11^2 + 13^2 + 4^2 with 11 = 11, 13 > 4 and 11*11 + 2*13*4 = 15^2.
a(659) = 1 since 659 = 17^2 + 17^2 + 9^2 + 0^2 with 17 = 17, 9 > 0 and 17*17 + 2*9*0 = 17^2.
a(899) = 1 since 899 = 7^2 + 15^2 + 24^2 + 7^2 with 7 < 15, 24 > 7 and 7*15 + 2*24*7 = 21^2.
a(1443) = 1 since 1443 = 7^2 + 31^2 + 17^2 + 12^2 with 7 < 31, 17 > 12 and 7*31 + 2*17*12 = 25^2.
a(1955) = 1 since 1955 = 19^2 + 27^2 + 28^2 + (9)^2 with 19 < 27, 28 > 9 and 19*27 + 2*28*(9) = 3^2.


MATHEMATICA

SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[SQ[nx^2y^2z^2]&&SQ[x*y+2*z*Sqrt[nx^2y^2z^2]], r=r+1], {x, 0, Sqrt[n/2]}, {y, x, Sqrt[nx^2]}, {z, Ceiling[Sqrt[(nx^2y^2)/2]], Sqrt[(nx^2y^2)/2]}]; Print[n, " ", r]; Continue, {n, 0, 80}]


CROSSREFS

Cf. A000118, A000290, A260625, A261876, A262357, A267121, A268197, A268507, A269400, A271510, A271513, A271518, A271608, A271665, A271714, A271721, A271724, A271775, A271778, A271824, A272084, A272332, A272351, A272620.
Sequence in context: A056173 A216817 A263765 * A027348 A238325 A238885
Adjacent sequences: A270070 A270071 A270072 * A270074 A270075 A270076


KEYWORD

nonn


AUTHOR

ZhiWei Sun, May 07 2016


EXTENSIONS

All statements in the examples checked by Rick L. Shepherd, May 27 2016


STATUS

approved



