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 A306673 #23 Dec 28 2023 16:37:39 %S A306673 1,2,4,7,12,16,26,34,46,56,76,90,116,135,161,187,229,257,308,344,394, %T A306673 439,511,558,636,698,779,849,959,1027,1152,1245,1362,1465,1603,1703, %U A306673 1874,2004,2164,2298,2507,2639,2867,3034,3235,3421,3690,3866,4147,4354 %N A306673 a(n) is the number of distinct, non-similar acute triangles with integer sides and largest side <= n. %e A306673 For n=4, there are 9 acute triangles with integer sides and largest side <= 4. These have sides {a,b,c} = {1, 1, 1}, {1, 2, 2}, {1, 3, 3}, {1, 4, 4}, {2, 2, 2}, {2, 2, 4}, {2, 3, 3}, {3, 3, 4}, {3, 4, 4}. But {2, 2, 2} is similar to {1,1,1} and {2,2,4} is similar to {1,1,2}, so these two triangles are excluded from the list and therefore a(4)=7. %p A306673 #nType=1 for acute triangles, nType=2 for obtuse triangles, nType=0 for both triangles %p A306673 CountTriangles := proc (n, nType := 1) %p A306673 local aa, oo, a, b, c, tt, lAcute; %p A306673 aa := {}; oo := {}; %p A306673 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 A306673 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 A306673 lAcute := evalb(0 < b^2+c^2-a^2); %p A306673 tt := sort([a, b, c]); %p A306673 if lAcute then aa := {op(aa), tt} else oo := {op(oo), tt} end if %p A306673 end if %p A306673 end do end do end do; %p A306673 return sort(`if`(nType = 1, aa, `if`(nType=2,oo,`union`(aa,oo)))) %p A306673 end proc %t A306673 Length@Select[DeleteDuplicates[Sort@# & /@ Tuples[Range@#, 3]], GCD @@ # == 1 && #[[1]] + #[[2]] > #[[3]] && #[[1]]^2 + #[[2]]^2 > #[[3]]^2 &] & /@ Range@50 (* _Hans Rudolf Widmer_, Dec 07 2023 *) %Y A306673 Cf. A247588, A306674, A306676, A306677, A306678. %K A306673 nonn %O A306673 1,2 %A A306673 _César Eliud Lozada_, Mar 04 2019