login
Number of integer-sided obtuse triangles with largest side n.
3

%I #21 Sep 05 2021 18:23:25

%S 0,0,1,1,2,4,5,7,10,12,15,17,21,25,29,33,37,42,48,53,58,65,71,76,83,

%T 91,100,106,113,122,130,140,149,158,169,177,188,197,210,221,230,243,

%U 255,269,281,292,306,318,333,346

%N Number of integer-sided obtuse triangles with largest side n.

%H Vladimir Letsko, <a href="http://dxdy.ru/post909787.html#p909787">Mathematical Marathon, problem 192</a> (in Russian).

%F 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

%e a(5) = 2 because there are 2 integer-sided acute triangles with largest side 5: (2,4,5); (3,3,5).

%p tr_o:=proc(n) local a,b,t,d;t:=0:

%p for a to n do

%p for b from max(a,n+1-a) to n do

%p d:=a^2+b^2-n^2:

%p if d<0 then t:=t+1 fi

%p od od;

%p t; end;

%Y Cf. A046080, A002623, A224921, A247586, A247587, A247588.

%K nonn

%O 1,5

%A _Vladimir Letsko_, Sep 20 2014