OFFSET
1,1
COMMENTS
The triples of sides (a, b, c) with a < b < c are in increasing lexicographic order.
These perimeters are of the form r^2 + r*s + s^2, r < s, gcd(r, s) = 1 and q = r/s (A034017), so they are all odd but not in increasing order. For example, a(6) = 129 for triple (25, 40, 64) while a(7) = 127 for triple (36, 42, 49).
For the corresponding primitive triples and miscellaneous properties, see A339859.
LINKS
Project Euler, Problem 370: Geometric triangles.
EXAMPLE
a(1) = 19 = 4+6+9 for the smallest such triangle (4, 6, 9) with 4 * 9 = 6^2 and a ratio q = 3/2.
a(2) = 37 = 9+12+16 for the triple (9, 12, 16) with 9 * 16 = 12^2 and a ratio q = 4/3.
MAPLE
for a from 1 to 300 do
for b from a+1 to floor((1+sqrt(5))/2 *a) do
for c from b+1 to floor((1+sqrt(5))/2 *b) do k:=a*c;
if k=b^2 and igcd(a, b, c)=1 then print(a+b+c); end if;
end do;
end do;
end do;
PROG
(PARI) lista(nn) = {my(phi = (1+sqrt(5))/2); for (a=1, nn, for (b=a+1, floor(a*phi), for (c=b+1, floor(b*phi), if ((a*c == b^2) && (gcd([a, b, c])==1), print1(a+b+c, ", ")); ); ); ); } \\ Michel Marcus, Jan 08 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernard Schott, Jan 08 2021
STATUS
approved