%I #12 Dec 07 2019 12:18:26
%S 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 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 0,0,1,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0
%N 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 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 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 Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HeronianTriangle.html">Heronian Triangle.</a>
%e Triangle begins
%e 0;
%e 0, 0;
%e 0, 0, 0;
%e 0, 0, 1, 0;
%e 0, 0, 1, 1, 2;
%e 0, 0, 0, 0, 1, 0;
%e 0, 0, 0, 0, 0, 0, 0;
%e 0, 0, 0, 0, 1, 1, 0, 0;
%e 0, 0, 0, 0, 0, 0, 0, 0, 0;
%e 0, 0, 0, 0, 0, 1, 0, 1, 1, 2.
%o def A221836(n,m) :
%o ....count = 0
%o ....for k in range(abs(n-m)+1, n+m) :
%o ........s = (n + m + k)/2
%o ........Asq = s * (s-n) * (s-m) * (s-k)
%o ........if Asq.is_integral() and Asq.is_square() : count += 1
%o ....return count
%o end
%K nonn,tabl
%O 1,15
%A _Eric M. Schmidt_, Jan 26 2013
|