OFFSET
1,15
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).
LINKS
Sourav Sen Gupta, Nirupam Kar, Subhamoy Maitra, Santanu Sarkar, and Pantelimon Stanica, Counting Heron triangles with Constraints, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 13, Paper A3, 2013.
Eric Weisstein's World of Mathematics, Heronian Triangle.
EXAMPLE
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.
PROG
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
end
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Eric M. Schmidt, Jan 26 2013
STATUS
approved