Skip to content
Vamshi Jandhyala

Books · Number Puzzles

Chapter 17

A Prime Number of Rails

  1. A right-angled triangular field has one side exactly 4747 rails long, and all three sides are a whole number of rails. How many rails are needed to fence it right round?

  2. What if that side were 4848 rails instead?

Solution

Part 1. We need a right triangle with whole-number sides, one of them 4747. As 4747 is far too short to be the hypotenuse, take it as a leg, with other leg bb and hypotenuse cc. Then 472=c2b2=(cb)(c+b).47^2 = c^2 - b^2 = (c - b)(c + b). Since 4747 is prime, 472=220947^2 = 2209 can only be written as 1×22091 \times 2209, so cb=1c - b = 1 and c+b=2209c + b = 2209, giving c=1105c = 1105 and b=1104b = 1104. The sides are 4747, 11041104, 11051105 (and indeed 472+11042=1105247^2 + 1104^2 = 1105^2), so the fence needs 47+1104+1105=2256 rails.47 + 1104 + 1105 = 2256 \text{ rails.} A prime leg pins the triangle down completely: there is only one such field.

Part 2. With 4848 the trick fails, because 482=230448^2 = 2304 splits in many ways into two factors of the same parity, and each gives a different triangle, for example (36,48,60),(20,48,52),(48,55,73),(48,64,80),(48,90,102),,(48,575,577).\begin{gathered} (36, 48, 60), \quad (20, 48, 52), \quad (48, 55, 73),\\ (48, 64, 80), \quad (48, 90, 102), \quad \dots, \quad (48, 575, 577). \end{gathered} So the question now has no single answer; the field could be fenced in many different ways. A prime side fixes a right triangle, a composite side does not.