login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A306674 Number of distinct non-similar obtuse triangles with integer sides and length of largest side <= n. 4
0, 0, 1, 2, 5, 9, 14, 21, 31, 44, 59, 76, 98, 123, 153, 186, 224, 266, 314, 368, 426, 491, 562, 638, 723, 815, 915, 1021, 1135, 1258, 1388, 1528, 1677, 1836, 2006, 2183, 2372, 2569, 2780, 3002, 3233, 3476, 3731, 4000, 4282, 4574, 4880, 5198, 5531, 5879 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Table of n, a(n) for n=1..50.

EXAMPLE

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.

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

CROSSREFS

Cf. A247587, A306673, A306676, A306677, A306678.

Sequence in context: A026053 A276031 A011905 * A098065 A123690 A199935

Adjacent sequences:  A306671 A306672 A306673 * A306675 A306676 A306677

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 24 23:45 EDT 2020. Contains 334581 sequences. (Running on oeis4.)