OFFSET
1,2
COMMENTS
The primitive Pythagorean triples cause A376900(n) to grow slightly overproportionally in relation to n, apart from minor fluctuations. This is why this sequence is finite and full.
LINKS
MAPLE
A379595:=proc(k)
local a, p, q, v, m;
a:=0;
for p from 2 to evalf(sqrt(sqrt(2)*k+1)) do
for q from 1 to min(p-1, floor(k/(sqrt(2)*p))) do
if gcd(p, q)=1 and is(p+q, odd) then
v:=max(p^2-q^2, 2*p*q);
m:=min(p^2-q^2, 2*p*q)/v;
a:=a+floor(k/v*sqrt(m^2-2*m+2));
fi
od
od;
if a=k then
return k
fi
end proc;
seq(A379595(k), k=0..1000);
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Felix Huber, Dec 26 2024
STATUS
approved