OFFSET
1,5
LINKS
Vladimir Letsko, Mathematical Marathon, problem 192 (in Russian).
FORMULA
a(n) = k*(k + (1+(-1)^n)/2) + Sum_{j=1..floor(n*(1-sqrt(2)/2))} floor(sqrt(2*j*n - j^2 - 1) - j), where k = floor((2*n*(sqrt(2) - 1) + 1 - (-1)^n)/4) (it appears that k(n) is A070098(n)). - Anton Nikonov, Sep 29 2014
EXAMPLE
a(5) = 2 because there are 2 integer-sided acute triangles with largest side 5: (2,4,5); (3,3,5).
MAPLE
tr_o:=proc(n) local a, b, t, d; t:=0:
for a to n do
for b from max(a, n+1-a) to n do
d:=a^2+b^2-n^2:
if d<0 then t:=t+1 fi
od od;
t; end;
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Letsko, Sep 20 2014
STATUS
approved