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.

A221836 Triangle in which m-th term of n-th row is the number of integer Heron triangles with two of the sides having lengths n, m.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Eric M. Schmidt, Jan 26 2013

Keywords

Comments

If the primes divisors of nm congruent to 1 mod 4 have multiplicities e_1, ..., e_r, then a(n, m) <= (3 + (-1)^(nm))/2 * (Product(2*e_j - 1, j = 1..r) - 1).

Examples

			Triangle begins
0;
0, 0;
0, 0, 0;
0, 0, 1, 0;
0, 0, 1, 1, 2;
0, 0, 0, 0, 1, 0;
0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 1, 1, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 0, 1, 0, 1, 1, 2.
		

Programs

  • Sage
    def A221836(n, m) :
        count = 0
        for k in range(abs(n-m)+1, n+m) :
            s = (n + m + k)/2
            Asq = s * (s-n) * (s-m) * (s-k)
            if Asq.is_integral() and Asq.is_square() : count += 1
        return count