login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A306673 a(n) is the number of distinct, non-similar acute triangles with integer sides and largest side <= n. 4
1, 2, 4, 7, 12, 16, 26, 34, 46, 56, 76, 90, 116, 135, 161, 187, 229, 257, 308, 344, 394, 439, 511, 558, 636, 698, 779, 849, 959, 1027, 1152, 1245, 1362, 1465, 1603, 1703, 1874, 2004, 2164, 2298, 2507, 2639, 2867, 3034, 3235, 3421, 3690, 3866, 4147, 4354 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
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.
MAPLE
#nType=1 for acute triangles, nType=2 for obtuse triangles, nType=0 for both triangles
CountTriangles := proc (n, nType := 1)
local aa, oo, a, b, c, tt, lAcute;
aa := {}; oo := {};
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
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
lAcute := evalb(0 < b^2+c^2-a^2);
tt := sort([a, b, c]);
if lAcute then aa := {op(aa), tt} else oo := {op(oo), tt} end if
end if
end do end do end do;
return sort(`if`(nType = 1, aa, `if`(nType=2, oo, `union`(aa, oo))))
end proc
MATHEMATICA
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 *)
CROSSREFS
Sequence in context: A359338 A362652 A266186 * A335892 A181020 A049631
KEYWORD
nonn
AUTHOR
César Eliud Lozada, Mar 04 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:35 EDT 2024. Contains 371906 sequences. (Running on oeis4.)