[Math] When is the area of a triangle whose side lengths are consecutive integers also an integer

diophantine equationsgeometrytriangles

Consider a triangle with side lengths 3, 4, and 5. By Heron's formula, its area is $\sqrt{6(6 – 5)(6-4)(6 – 3)} = \sqrt{6(1)(2)(3)} = \sqrt{36} = 6$. Are there any other triangles like this?

Best Answer

Because of a liking for symmetry, we let the sides be $y-1$, $y$, and $y+1$. Using the Heron Formula, we find, exactly like you did, that $\frac{3}{16}y^2(y^2-4)$ should be a perfect square. Thus $y$ must be even, say $y=2s$. So we want $3(s^2-1)$ to be a perfect square, say $(3t)^2$. We arrive at the equation $$s^2-3t^2=1,$$ an instance of a Pell Equation.

In this case, the equation has the fundamental solution $s_1=2$, $t_1=1$. By general theory of the Pell equation, the positive solutions $(s,t)$ are given by $$s=\frac{(2+\sqrt{3})^n+(2-\sqrt{3})^n}{2},\qquad t=\frac{(2+\sqrt{3})^n-(2-\sqrt{3})^n}{2},$$ where $n$ ranges over the positive integers.

In our case we are primarily interested in $s$. Let $s_0=1$ and $s_1=2$. Define $s_n$ by the recurrence $$s_{n+2}=4s_{n+1}-s_n.$$ For suitable $t_n$, $(s_n,t_n)$ ranges over the positive solutions of the Pell equation. For example, $s_2=7$, giving $y=14$. This is your $x=13$. Continuing, we get $s_3=26$, and $s_4=97$. These give your computed values. There are infinitely many others.

Remark: The Pell equation is dealt with in most introductions to number theory. There is also a very nice book on the equation, by Ed Barbeau.

Related Question