A triangle has side lengths $a, a$ and $b$. It has perimeter $P$ and area $A$. Given that $b$ and $P$ are integers, and that $P$ is numerically equal to $A^{2}$, find all possible pairs $(a, b)$.
Solution
We have that $P=2 a+b$ and, by Pythagoras' theorem, the height is $\sqrt{a^{2}-\frac{b^{2}}{4}}$ which means that $A=\frac{b}{2} \sqrt{a^{2}-\frac{b^{2}}{4}}$.
The condition in the question gives us the equation $2 a+b=\left(\frac{b^{2}}{4}\right)\left(a^{2}-\frac{b^{2}}{4}\right)$.
Thus $16(2 a+b)=b^{2}\left(4 a^{2}-b^{2}\right)=b^{2}(2 a-b)(2 a+b)$.
We may divide by the (positive) $2 a+b$ to get $b^{2}(2 a-b)=16$. (If $a=b=0$ we do get a solution to the equation, but this corresponds to a single point rather than a triangle.)
Since $b$ and $(2 a-b)=P-2 b$ are both integers, $b^{2}$ must be a square factor of 16. The possible values are 1,4 and 16 and we can substitute these into the equation in turn to find that $(a, b)=\left(\frac{17}{2}, 1\right),(3,2)$ or $\left(\frac{5}{2}, 4\right)$.

REMARK
Candidates were not penalised for including the solution $(a, b)=(0,0)$ but it was not required to get full marks.

REMARK
It is also possible to obtain the same equation linking $a$ and $b$ by using Heron's formula for the area of a triangle.