OFFSET
1,3
COMMENTS
Conjecture: a(n) > 0 for all n > 5, and a(n) = 1 only for n = 7, 9, 23, 25, 31, 55, 2^k*m (k = 1,2,... and m = 1, 5), 2^(2k+1)*m (k = 0,1,2,... and m = 3, 13, 21).
This conjecture implies that any integer n > 5 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 8*x+12*y and 15*z are the two legs of a right triangle with positive integer sides.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.GM], 2016.
EXAMPLE
a(2) = 1 since 2 = 1^2 + 0^2 + 1^2 + 0^2 with 1 + 0 > 0 < 1 and (8*1+12*0)^2 + (15*1)^2 = 17^2.
a(4) = 1 since 4 = 1^2 + 1^2 + 1^2 + 1^2 with 1 + 1 > 0 < 1 and (8*1+12*1)^2 + (15*1)^2 = 25^2.
a(6) = 1 since 6 = 1^2 + 0^2 + 1^2 + 2^2 with 1 + 0 > 0 < 1 and (8*1+12*0)^2 + (15*1)^2 = 17^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 + 1 > 0 < 1 and (8*1+12*1)^2 + (15*1)^2 = 25^2.
a(9) = 1 since 9 = 2^2 + 0^2 + 2^2 + 1^2 with 2 + 0 > 0 < 2 and (8*2+12*0)^2 + (15*2)^2 = 34^2.
a(10) = 1 since 10 = 0^2 + 3^2 + 1^2 + 0^2 with 0 + 3 > 0 < 1 and (8*0+12*3)^2 + (15*1)^2 = 39^2.
a(20) = 1 since 20 = 3^2 + 1^2 + 1^2 + 3^2 with 3 + 1 > 0 < 1 and (8*3+12*1)^2 + (15*1)^2 = 39^2.
a(23) = 1 since 23 = 2^2 + 1^2 + 3^2 + 3^2 with 2 + 1 > 0 < 3 and (8*2+12*1)^2 + (15*3)^2 = 53^2.
a(25) = 1 since 25 = 1^2 + 2^2 + 4^2 + 2^2 with 1 + 2 > 0 < 4 and (8*1+12*2)^2 + (15*4)^2 = 68^2.
a(26) = 1 since 26 = 0^2 + 3^2 + 1^2 + 4^2 with 0 + 3 > 0 < 1 and (8*0+12*3)^2 + (15*1)^2 = 39^2.
a(31) = 1 since 31 = 3^2 + 3^2 + 3^2 + 2^2 with 3 + 3 > 0 < 3 and (8*3+12*3)^2 + (15*3)^2 = 75^2.
a(42) = 1 since 42 = 2^2 + 2^2 + 5^2 + 3^2 with 2 + 2 > 0 < 5 and (8*2+12*2)^2 + (15*5)^2 = 85^2.
a(55) = 1 since 55 = 6^2 + 1^2 + 3^2 + 3^2 with 6 + 1 > 0 < 3 and (8*6+12*1)^2 + (15*3)^2 = 75^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&SQ[(8x+12y)^2+(15z)^2], r=r+1], {x, 0, Sqrt[n-1]}, {y, Max[0, 1-x], Sqrt[n-1-x^2]}, {z, 1, Sqrt[n-x^2-y^2]}]; Print[n, " ", r]; Continue, {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 15 2016
STATUS
approved