login
Number of triangles with perimeter n having integer sides and area.
27

%I #19 Feb 01 2021 20:38:00

%S 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,2,0,0,

%T 0,4,0,0,0,1,0,2,0,1,0,0,0,3,0,2,0,0,0,4,0,1,0,0,0,3,0,0,0,5,0,1,0,1,

%U 0,2,0,5,0,0,0,1,0,1,0,4,0,0,0,8,0,0,0,1,0,5,0,0,0,0,0,5,0,6,0,5,0,0,0,2,0,0,0,12,0,1,0

%N Number of triangles with perimeter n having integer sides and area.

%C No such triangles with odd perimeter exist.

%H Giovanni Resta, <a href="/A051516/b051516.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Seiichi Manyama)

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HeronianTriangle.html">Heronian Triangle</a>.

%F a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} (1 - ceiling(m) + floor(m)) * sign(floor((i+k)/(n-i-k+1))), where m = sqrt((n/2)*(n/2-i)*(n/2-k)*(i+k-n/2)). - _Wesley Ivan Hurt_, May 11 2019

%t Table[Sum[Sum[(1 - Ceiling[Sqrt[(n/2) (n/2 - i) (n/2 - k) (i + k - n/2)]] + Floor[Sqrt[(n/2) (n/2 - i) (n/2 - k) (i + k - n/2)]])*Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}] (* _Wesley Ivan Hurt_, May 11 2019 *)

%Y Cf. A024153, A070139.

%K nonn

%O 1,32

%A _David W. Wilson_