OFFSET
1,13
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
R. Zumkeller, Integer-sided triangles
MAPLE
f:= proc(n) local a, b, q, bmin, bmax, t;
t:= 0;
for a from 1 to n/3 do
if n::even then bmin:= max(a+1, n/2-a+1) else bmin:= max(a+1, (n+1)/2-a) fi;
q:= (n^2-2*n*a)/(2*(n-a));
if q::integer then bmax:= min((n-a)/2, q-1) else bmax:= min((n-a)/2, floor(q)) fi;
t:= t + nops(select(b -> igcd(a, b, n-a-b) = 1, [$bmin .. bmax]))
od;
t
end proc:
map(f, [$1..100]); # Robert Israel, Jul 26 2024
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, May 05 2002
STATUS
approved