cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 12 2016

Keywords

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.

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.
		

Crossrefs

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}]