OFFSET
1,6
LINKS
Peter Kagey, Table of n, a(n) for n = 1..1000
Mathematics Stack Exchange, Properties of triangles with integer sides and area
Wikipedia, Heronian triangle
EXAMPLE
For n = 7, the a(7) = 4 Heronian triangles with perimeter A051518(7) = 36 are:
the 10-13-13 isosceles triangle (area 60),
the 10-10-16 isosceles triangle (area 48),
the 9-12-15 scalene triangle (area 54), and
the 9-10-17 scalene triangle (area 36).
MATHEMATICA
htc[p_] := Block[{t=0, c, q=p/2}, Do[c=p-a-b; If[c >= b && a+c > b && a+b > c && IntegerQ[Sqrt[q (q-a) (q-b) (q-c)]], t++], {a, p/3}, {b, a, p-a-1}]; t]; Select[htc /@ (Range[128] 2), # > 0 &] (* Giovanni Resta, Jun 14 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Kagey, Jun 08 2018
STATUS
approved