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.

This page as a plain text file.
%I A221836 #17 May 04 2025 14:38:52
%S A221836 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,
%T A221836 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,
%U A221836 0,0,1,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0
%N 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.
%C A221836 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).
%H A221836 Sourav Sen Gupta, Nirupam Kar, Subhamoy Maitra, Santanu Sarkar, and Pantelimon Stanica, <a href="http://www.emis.de/journals/INTEGERS/papers/n3/n3.Abstract.html">Counting Heron triangles with Constraints</a>, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 13, Paper A3, 2013.
%H A221836 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HeronianTriangle.html">Heronian Triangle.</a>
%e A221836 Triangle begins
%e A221836 0;
%e A221836 0, 0;
%e A221836 0, 0, 0;
%e A221836 0, 0, 1, 0;
%e A221836 0, 0, 1, 1, 2;
%e A221836 0, 0, 0, 0, 1, 0;
%e A221836 0, 0, 0, 0, 0, 0, 0;
%e A221836 0, 0, 0, 0, 1, 1, 0, 0;
%e A221836 0, 0, 0, 0, 0, 0, 0, 0, 0;
%e A221836 0, 0, 0, 0, 0, 1, 0, 1, 1, 2.
%o A221836 (Sage)
%o A221836 def A221836(n, m) :
%o A221836     count = 0
%o A221836     for k in range(abs(n-m)+1, n+m) :
%o A221836         s = (n + m + k)/2
%o A221836         Asq = s * (s-n) * (s-m) * (s-k)
%o A221836         if Asq.is_integral() and Asq.is_square() : count += 1
%o A221836     return count
%K A221836 nonn,tabl
%O A221836 1,15
%A A221836 _Eric M. Schmidt_, Jan 26 2013