A271719 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.
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, 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, 15, 8, 21, 12, 15, 9
Offset: 1
Keywords
Examples
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.
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.
Programs
-
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}]
Comments