OFFSET
1,6
COMMENTS
Conjecture: a(n) > 0 for all n > 10, and a(n) = 1 only for n = 11, 12, 14, 18, 24, 54.
See also A271714 for a similar conjecture refining Lagrange's four-square theorem.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..2000
Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723, 2016.
EXAMPLE
a(6) = 2 since 6 = 3 + 1 + 2 with 3 > 1, gcd(3,1,2) = 1 and 3^2 + (2*1+2)^2 = 5^2, and also 6 = 4 + 1 + 1 with 4 > 1, gcd(4,1,1) = 1 and 4^2 + (2*1+1)^2 = 5^2.
a(11) = 1 since 11 = 6 + 3 + 2 with 6 > 3, gcd(6,3,2) = 1 and 6^2 + (2*3+2)^2 = 10^2.
a(12) = 1 since 12 = 5 + 5 + 2 with 5 = 5, gcd(5,5,2) = 1 and 5^2 + (2*5+2)^2 = 13^2.
a(14) = 1 since 14 = 5 + 3 + 6 with 5 > 3, gcd(5,3,6) = 1 and 5^2 + (2*3+6)^2 = 13^2.
a(18) = 1 since 18 = 8 + 5 + 5 with 8 > 5, gcd(8,5,5) = 1 and 8^2 + (2*5+5)^2 = 17^2.
a(24) = 1 since 24 = 7 + 7 + 10 with 7 = 7, gcd(7,7,10) = 1 and 7^2 + (2*7+10)^2 = 25^2.
a(54) = 1 since 54 = 28 + 19 + 7 with 28 > 19, gcd(28,19,7) = 1 and 28^2 + (2*19+7)^2 = 53^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[GCD[x, y, n-x-y]==1&&SQ[x^2+(2y+(n-x-y))^2], r=r+1], {x, 1, n-2}, {y, 1, Min[x, n-1-x]}]; Print[n, " ", r]; Label[aa]; Continue, {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Apr 12 2016
STATUS
approved