Name the points. Let the point on the bottom left corner be A, that on the bottom right corner be B, and the one on top be C.
Let H be the point on AB such that CH is perpendicular to AB.
We calculate angle A in terms of n using Law of Cosines.
\(\cos A = \dfrac{(n + 1)^2 + (n + 2)^2 - (n + 3)^2}{2(n+1)(n+2)}\\ \cos A = \dfrac{n-2}{2(n+1)}\)
By this, AH = \(\dfrac{n - 2}2\).
Using Pythagorean theorem on triangle AHC,
\(\left(\dfrac n2 - 1\right)^2 + n^2 = (n + 1)^2\\ \left(\dfrac n2 - 1\right)^2 = 2n+1\\ \dfrac{n^2}4 - 3n = 0\\ n(n - 12) = 0\\ n = 12\)
The perimeter is (12 + 1) + (12 + 2) + (12 + 3) = 42.