cp's OEIS Frontend

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.

A070203 Number of scalene integer triangles with perimeter n having integral inradius.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 8, 0, 0, 0, 1, 0, 3
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

a(n) = A070201(n) - A070204(n).

Crossrefs

Programs

  • Ruby
    def A(n)
      cnt = 0
      (1..n / 3).each{|a|
        (a + 1..(n - a) / 2).each{|b|
          c = n - a - b
          if a + b > c && b < c
            s = n / 2r
            t = (s - a) * (s - b) * (s - c) / s
            if t.denominator == 1
              t = t.to_i
              cnt += 1 if Math.sqrt(t).to_i ** 2 == t
            end
          end
        }
      }
      cnt
    end
    def A070203(n)
      (1..n).map{|i| A(i)}
    end
    p A070203(100) # Seiichi Manyama, Oct 07 2017