This is probably a old puzzle,and maybe you have seen it somewhere else before.Imagine a special triangle. The height and the three sides of this triangle are 4 consecutive integers.Can you figure out what are the lengths of the sides and of the height?


We answer the following seemingly more general question. Find all triangles such that the sides of the triangle and one of the altitudes are four integers which are, in some order, consecutive terms of an arithmetic progression. We can assume that these four terms are $q+d$, $q$, $q-d$, and $q-2d$, where $d$ is positive and $q$ and $d$ are relatively prime.

We will use Heron's Formula for the area of a triangle in terms of its sides. If a triangle has sides $a$, $b$, and $c$, then the area of the triangle is $$\sqrt{s(s-a)(s-b)(s-c)},\quad \text{where} \quad s=\frac{a+b+c}{2}.$$

At least two of the sides of the triangle are greater than the altitude. There are two sorts of cases to consider: (1) The altitude is the second smallest of the numbers $q+d$, $q$, $q-d$, and $q-2d$ and (2) The altitude is the smallest of these four numbers.

Case 1: We have $s=(3q-d)/2$. Thus by Heron's Formula the area of the triangle is $\sqrt{(3q-d))(q-3d)(q-d)(q+3d)/16}$. But this area is also $(1/2)(q-2d)(q-d)$. Squaring, we obtain $$\frac{(3q-d)(q-3d)(q-d)(q+3d)}{16}=\frac{(q-2d)^2(q-d)^2}{4}.$$ Cancel a $q-d$ from both sides, multiply through by $16$, and simplify. After a while we arrive at $$q^3-19q^2d+59qd^2-25d^3=0.$$ We look for solutions of this equation in relatively prime positive integers. Since $q$ divides the first three terms of the equation, it must divide $25d^3$. Since $q$ is relatively prime to $d$, $q$ must divide $25$, which leaves the possibilities $q=1$, $q=5$, and $q=25$. None of these works.

Case 2: Heron's Formula shows that the triangle has area $\sqrt{(3q)(q-2d)(q)(q+2d)/16}$. There are unfortunately three possibilities: (i) The altitude is to the side $q$; (ii) The altitude is to the side $q+d$; (iii) The altitude is to the side $q-d$. In each case, by Herons's Formula, the area of the triangle is $\sqrt{(3q)(q-2d)(q)(q+2d)/16}$.

(i): The area is then $(q)(q-2d)/2$. We obtain the equation $$\frac{(3q)(q-2d)(q)(q+2d)}{16}=\frac{(q)^2(q-2d)^2}{4}.$$ Divide through by $q^2(q-2d)$, multiply by $16$, and simplify. We obtain $q=14d$, so since $q$ and $d$ are relatively prime we have $q=14$ and $d=1$. That gives us the triangle with sides $15$, $14$, $13$, and height $12$ (together with all integers scalings of this triangle).

(ii): The area is $(q+d)(q-2d)/2$. We obtain the equation $$\frac{(3q)(q-2d)(q)(q+2d)}{16}=\frac{(q+d)^2(q-2d)^2}{4}.$$ This simplifies to $q^3-6q^2d -12qd^2-8d^3=0$. We look for relatively prime positive integer solutions. Since $q$ divides the first three terms, it must divide $8$, and it is easy to check that none of $1$, $2$, $4$, or $8$ work. (Of course $1$ and $2$ are irrelevant, since they would not give a triangle).

(iii): The area is $(q-d)(q-2d)/2$. We obtain the equation $\frac{(3q)(q-2d)(q)(q+2d)}{16}=\frac{(q-d)^2(q-2d)^2}{4}.$ This simplifies to $q^3-22q^2d +20qd^2-8d^3=0$, which again has no solutions in relatively prime integers.

Comments: In Case 1, there are up to similarity two solutions in which our four numbers form an arithmetic progression, and in each of Cases 2(ii) and 2(iii) there is one, but for all of these $q$ and $d$ are incommensurable.

The original problem in principle does not require much machinery. If $q$ is not small, then the numbers from $q-2$ to $q+1$ are (relatively) close to each other, so the triangle looks more or less equilateral. But an altitude of an equilateral triangle is not close to a side in length. So we can see that large $q$ are not possible, and it comes down to checking a smallish number of cases.
However, the algebra is more efficient.

  • 1
    $\begingroup$ ,man you made real science of this recreational question :) $\endgroup$ – Peđa Terzić Sep 12 '11 at 15:33
  • 1
    $\begingroup$ @pedja: The tag doesn't matter. Anyway, all of mathematics is recreational. $\endgroup$ – André Nicolas Sep 12 '11 at 17:08

J. M. gives a reference to the answer in a comment on the question. I think a proof that that's the answer can be dug out of a paper by J A MacDougall, Heron triangles with sides in arithmetic progression. That paper may be overkill for this problem, that is, MacDougall is trying to do a lot more, so there may be an easier way if all you want to do is settle the current question.


It is most convenient to calculate the area using Heron's formula:

A=$\sqrt{s(s-a)(s-b)(s-c)}$ , where s=$\frac{a+b+c}{2}$

Let the sides of the triangle be b - 1, b and b + 1 .Then s=$\frac{3b}{2}$,and substitution of these into the formula gives:


Since A=$\frac{bh_b}{2}$ it is true that:$\frac{bh_b}{2}$ =$\dfrac{b*\sqrt{3(b^2-4)}}{4}$ or $h_b$=$\dfrac{\sqrt{3(b^2-4)}}{2}$

This means that $3(b^2-4)$ must be even square number.If b were odd, then $3(b^2-4)$ would be odd and would not be even square number so b must be of the form b=2k,where k is positive integer.

If we replace 2k instead b we get that $12(k^2-1)$ must be square number or we can say that $3(k^2-1)$ must be square number.

All we have to do is try for each consecutive integer starting with $1$ whether formula $3(k^2-1)$ gives square number.The first k wich satisfy such condition is k=$7$ ,

Since b=2k we have that b=$14$; a=b-$1$=$13$; c=b+$1$=$15$ and according to formula $h_b$=$\dfrac{\sqrt{3(b^2-4)}}{2}$ $h_b$=$12$ so requested numbers are $12$,$13$,$14$,$15$

  • $\begingroup$ I thought about this method too. However you made some "shortcuts". (1) You assume that the height is cast on the edge b, i.e. the "middle" edge. It's not obvious that there are other variants. (2) The last part of your solution, it's surprising that you don't use the fact that h should be equal to b-2, you just verify this at the end. OTOH if you substitute b-2 instead of h you'll get *k*=7 directly, it'll also prove that there are no other solutions. $\endgroup$ – valdo Sep 12 '11 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.