OFFSET
1,1
LINKS
Felix Huber, Table of n, a(n) for n = 1..1420
EXAMPLE
A366428(1) = 25, the corresponding primitive Pythagorean triple is (7, 24, 25). a(1) = min(7, 24) = 7.
MAPLE
A366674:=proc(N) # To get all terms for which c <= N
local a, b, c, i, l, p, q;
l:=[];
for p from 2 to floor(sqrt(N-1)) do
for q to min(p-1, floor(sqrt(N-p^2))) do
if gcd(p, q)=1 and is(p-q, odd) then
c:=p^2+q^2;
b:=max(p^2-q^2, 2*p*q);
a:=min(p^2-q^2, 2*p*q);
if c^2>NumberTheory:-Radical(c*b*a) then
l:=[op(l), [c, b, a]];
fi
fi
od
od;
return seq((sort(l)[i])[3], i=1..nops(l));
end proc:
A366674(15641);
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Huber, Oct 16 2023
STATUS
approved
