Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 May 01 2016 13:25:06
%S 0,0,0,0,0,2,0,0,0,0,1,1,3,1,2,4,3,1,3,4,3,2,2,1,4,2,5,4,5,2,6,4,7,4,
%T 6,4,8,5,7,7,10,3,9,7,10,9,10,4,8,5,6,4,9,1,8,5,7,6,12,4,17,11,15,10,
%U 15,8,21,12,15,9
%N Number of ordered ways to write n as x + y + z with x >= y > 0, z > 0 and gcd(x,y,z) = 1 such that x^2 + (2*y+z)^2 is a square.
%C Conjecture: a(n) > 0 for all n > 10, and a(n) = 1 only for n = 11, 12, 14, 18, 24, 54.
%C See also A271714 for a similar conjecture refining Lagrange's four-square theorem.
%H Zhi-Wei Sun, <a href="/A271719/b271719.txt">Table of n, a(n) for n = 1..2000</a>
%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1604.06723">Refining Lagrange's four-square theorem</a>, arXiv:1604.06723, 2016.
%e 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.
%e 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.
%e 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.
%e 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.
%e 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.
%e 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.
%e 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.
%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
%t 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}]
%Y Cf. A000290, A271714.
%K nonn
%O 1,6
%A _Zhi-Wei Sun_, Apr 12 2016