login
A396355
a(n) is the number of integer-sided triangles (x <= y <= z) with circumradius R = A339952(n) such that gcd(x, y, z, R) = 1.
0
1, 1, 1, 4, 1, 1, 1, 0, 1, 1, 10, 1, 10, 1, 1, 1, 1, 1, 0, 5, 1, 10, 1, 0, 1, 4, 1, 1, 10, 1, 1, 10, 10, 0, 1, 1, 1, 0, 1, 0, 10, 1, 1, 1, 4, 1, 10, 1, 1, 22, 0, 1, 1, 1, 10, 0, 1, 10, 1, 1, 1, 0, 1, 1, 22, 1, 10, 1, 1, 1, 0, 10, 10, 10, 10, 1, 1, 10, 1, 10, 0
OFFSET
1,4
COMMENTS
For any integer-sided triangle (x, y, z) with integer circumradius R and gcd(x, y, z, R) = 1, one has R in A339952. Proof: Let x <= y <= z be integers and R an integer circumradius. Then x = 2*R*sin X, y = 2*R*sin Y, z = 2*R*sin Z, so sin X, sin Y, sin Z are rational, and R = x*y*z/(4*A). Any rational sine has the form sin T = 2*a*b/(a^2 + b^2) with gcd(a,b) = 1 and a + b odd. From x = 2*R*sin X we get (a^2 + b^2)*x = 4*R*a*b, hence (a^2 + b^2) | 4*R. Doing the same for a second angle gives (c^2 + d^2) | 4*R. A prime p == 3 (mod 4) cannot divide a^2 + b^2 (else p | a and p | b, contradicting gcd(a,b) = 1), and similarly for c^2 + d^2; thus these numbers have only factors 2 or p == 1 (mod 4). Choose two angles with gcd(a^2 + b^2, c^2 + d^2) = 1. Then (a^2 + b^2)*(c^2 + d^2) | 4*R and is a sum of two squares, hence 4*R is a sum of two squares. Therefore every prime p == 3 (mod 4) divides R to an even exponent; write R = e^2 + o^2 with e > 0 even and o odd. Thus R is in A339952.
Conversely, for any R = e^2 + o^2 with e even > 0 and o odd, the right triangle [2*(e^2 - o^2), 4*e*o, 2*(e^2 + o^2)] has integer sides and circumradius R; hence 4*R | x*y*z and A = x*y*z/(4*R) is an integer.
Although every R in A339952 is the circumradius of some integer-sided triangle, such a triangle need not be primitive in the strong sense gcd(x, y, z, R) = 1; hence a(n) can be 0 for some n (e.g., R = 45).
a(n) = 2*k - (k mod 2) for R = A339952(n) = p^k. Proof: By the sum-of-two-squares theorem, a prime power p^k appears as X^2 + Y^2 with p==1 (mod 4) only. For such p, there are k + 1 primitive "directions" of representation; exactly k of them have parity X even, Y odd with X>0 (if k is odd there is one extra odd + odd direction, not counted here). Strong-primitive triangles arise by pairing these directions; this doubles the count, except that for odd k one symmetry class does not contribute. Hence a(n) = 2k - (k mod 2).
FORMULA
a(n) = 2*e - (e mod 2) for A339952(n) = p^e.
EXAMPLE
For R = A339952(4) = 25 = 5^2 one has the a(4) = 2*2 - (2 mod 2) = 4 triangles [14, 30, 40], [14, 48, 50], [30, 30, 48], [40, 40, 48].
MAPLE
A396355List := proc(N)
local a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z;
b := ceil((N / 0.38) * (1 + sqrt(ln(max(16, N))))); e := table();
do
for c from 2 by 2 to isqrt(b) do
for d from 1 by 2 to isqrt(b - c^2) do
g := c^2 + d^2; if type(g, odd) then e[g] := true end if
end do
end do;
if numelems(e) < N then b := ceil(3*b/2) else break end if
end do;
f := [op(1 .. N, sort([indices(e, 'nolist')]))];
a := table();
for n to N do
g := f[n]; h := g^2; i := 2*g; a[g] := 0; e := table();
for x from 1 while x^2 <= 3*h do
v := igcd(x, g); w := iquo(g, v);
for y from x to i do
j := min(x + y - 1, i);
if irem(x, 4) = 0 or irem(y, 4) = 0 then m := 1
elif irem(x, 2) = 0 or irem(y, 2) = 0 then m := 2
else m := 4
end if;
p := ilcm(iquo(w, igcd(y, w)), m);
q := y + irem(p - irem(y, p), p); if q > j then next end if;
s := x*y; t := y - x; u := x + y;
for z from q to j by p do
if h*(u + z)*(t + z)*(z - t)*(u - z) = (s*z)^2 then
k := igcd(x, y, z); l := iquo(x, k); o := iquo(y, k); r := iquo(z, k);
if igcd(k, g) = 1 then
if not assigned(e[[l, o, r]]) then e[[l, o, r]] := true; a[g] := a[g] + 1 end if
end if
end if
end do
end do
end do
end do;
[seq(a[f[n]], n = 1 .. N)]
end proc:
A396355List(81);
KEYWORD
nonn
AUTHOR
Felix Huber, May 23 2026
STATUS
approved