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 A190021 #21 Feb 16 2025 08:33:14 %S A190021 0,0,2,8,23,51,101,179,295,460,688,988,1382,1876,2495,3258,4191,5298, %T A190021 6613,8166,9973,12065,14472,17208,20341,23873,27838,32282,37238,42734, %U A190021 48840,55573,62973,71067,79934,89640,100172,111613,123959,137336,151842 %N A190021 Number of acute triangles, distinct up to congruence, on an n X n grid (or geoboard). %H A190021 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Geoboard.html">Geoboard</a>. %H A190021 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/AcuteTriangle.html">Acute Triangle</a>. %F A190021 a(n) = A028419(n) - A189979(n) - A190022(n). %e A190021 For n = 3 the two acute triangles are: %e A190021 *.. .*. %e A190021 ..* *.. %e A190021 *.. ..* %p A190021 Triangles:=proc(n) local TriangleSet, i, j, k, l, A, B, C; TriangleSet:={}: for i from 0 to n do for j from 0 to n do for k from 0 to n do for l from 0 to n do A:=i^2+j^2: B:=k^2+l^2: C:=(i-k)^2+(j-l)^2: if A^2+B^2+C^2<>2*(A*B+B*C+C*A) then TriangleSet:={op(TriangleSet), sort([sqrt(A), sqrt(B), sqrt(C)])}: fi: od: od: od: od: return(TriangleSet); end: %p A190021 IsAcuteTriangle:=proc(T) if T[1]^2+T[2]^2>T[3]^2 and T[1]^2+T[3]^2>T[2]^2 and T[2]^2+T[3]^2>T[1]^2 then true else false fi: end: %p A190021 a:=proc(n) local TriangleSet,AcuteTriangleSet,i; TriangleSet:=Triangles(n): AcuteTriangleSet:={}: for i from 1 to nops(TriangleSet) do if IsAcuteTriangle(TriangleSet[i]) then AcuteTriangleSet:={op(AcuteTriangleSet),TriangleSet[i]} fi: od: return(nops(AcuteTriangleSet)); end: %Y A190021 Cf. A028419, A189979, A190022. %K A190021 nonn %O A190021 1,3 %A A190021 _Martin Renner_, May 04 2011 %E A190021 a(21)-a(40) from _Martin Renner_, May 08 2011