|
EXAMPLE
|
a(1) = 12 because 12 is the area of the 5-5-6 triangle, which is the least-area primitive Heronian triangle for which a rectangle exists with integer dimensions (2-by-6) and with perimeter (16) and area (12) equal respectively to the perimeter and area of the triangle.
a(2) = 126 because 126 is the area of the 13-20-21 triangle, which is the second-least-area primitive Heronian triangle for which a rectangle exists with integer dimensions (6-by-21) and with perimeter (54) and area (126) equal respectively to the perimeter and area of the triangle.
|
|
MATHEMATICA
|
(* Adapted from Albert Lau's program for A224301 *)
AMax = 10000;
Do[c = p/b;
a1 = Sqrt[b^2 + c^2 + 2 Sqrt[b^2 c^2 - 4 A^2]];
a2 = Sqrt[b^2 + c^2 - 2 Sqrt[b^2 c^2 - 4 A^2]];
If[IntegerQ[a2] && GCD[a2, b, c] == 1 &&
a1 > a2 >= b && (per = a2 + b + c;
IntegerQ[(per + Sqrt[per^2 - 16 A])/4]), A // Sow(*{A, a2, b, c}//
Sow*)];
If[IntegerQ[a1] &&
GCD[a1, b, c] == 1 && (per = a1 + b + c;
IntegerQ[(per + Sqrt[per^2 - 16 A])/4]), A // Sow(*{A, a1, b, c}//
Sow*)]; , {A, 6, AMax, 6}, {p,
4 A^2 // Divisors //
Select[#, EvenQ[#] && # >= 2 A &] & // #/2 + 2 A^2/# & //
Select[#, IntegerQ] &}, {b,
p // Divisors // Select[#, #^2 >= p &] &}] // Reap // Last // Last
{a1, a2, c} =.;
|