This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A306674 #16 May 03 2019 19:23:35 %S A306674 0,0,1,2,5,9,14,21,31,44,59,76,98,123,153,186,224,266,314,368,426,491, %T A306674 562,638,723,815,915,1021,1135,1258,1388,1528,1677,1836,2006,2183, %U A306674 2372,2569,2780,3002,3233,3476,3731,4000,4282,4574,4880,5198,5531,5879 %N A306674 Number of distinct non-similar obtuse triangles with integer sides and length of largest side <= n. %e A306674 For n=6, there are 9 integer-sided obtuse triangles with largest side <= n. These have sides {a, b, c} = {2, 2, 3}, {2, 3, 4}, {2, 4, 5}, {2, 5, 6}, {3, 3, 5}, {3, 4, 5}, {3, 4, 6}, {3, 5, 6}, {4, 4, 6}. But {4, 4, 6} is similar to {2, 2, 3} and is excluded from the list, so a(6) = 8. %p A306674 #nType=1 for acute triangles, nType=2 for obtuse triangles, nType=0 for both triangles %p A306674 CountTriangles := proc (n, nType := 1) %p A306674 local aa, oo, a, b, c, tt, lAcute; %p A306674 aa := {}; oo := {}; %p A306674 for a from n by -1 to 1 do for b from a by -1 to 1 do for c from b by -1 to 1 do %p A306674 if a < b+c and abs(b-c) < a and b < c+a and abs(c-a) < b and c < a+b and abs(a-b) < c and gcd(a, gcd(b, c)) = 1 then %p A306674 lAcute := evalb(0 < b^2+c^2-a^2); %p A306674 tt := sort([a, b, c]); %p A306674 if lAcute then aa := {op(aa), tt} else oo := {op(oo), tt} end if %p A306674 end if %p A306674 end do end do end do; %p A306674 return sort(`if`(nType = 1, aa, `if`(nType=2,oo,`union`(aa,oo)))) %p A306674 end proc %Y A306674 Cf. A247587, A306673, A306676, A306677, A306678. %K A306674 nonn %O A306674 1,4 %A A306674 _César Eliud Lozada_, Mar 04 2019