Triangle Perimeters and Areas

Find the dimensions of all triangles that have area equal
numerically to M times the perimeter, where all sides
are whole numbers. (M=1,2,3,4,5)

Repeat for perimeter equal to M times the area.

There are actually many solutions for the questions above, so
try to find the triangles with the minimum perimeters.
I'd be very interested to know of any formulas used by people to
obtain their solutions.