OFFSET
1,3
LINKS
Eric Weisstein's World of Mathematics, Geoboard.
Eric Weisstein's World of Mathematics, Acute Triangle.
EXAMPLE
For n = 3 the two acute triangles are:
*.. .*.
..* *..
*.. ..*
MAPLE
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:
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:
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:
CROSSREFS
KEYWORD
nonn
AUTHOR
Martin Renner, May 04 2011
EXTENSIONS
a(21)-a(40) from Martin Renner, May 08 2011
STATUS
approved