**From New Scientist #1631, 22nd September 1988** [link]

Kugelbaum was running through a geometrical proof with some of his students when he suddenly went off at a tangent.

“What an extraordinary rectangle I have just drawn!” he remarked out loud. “Why, the number of inches in the perimeter is an integer equal to the number of square inches in its area. And yet, no one of its sides is a rational number of inches long”. (A rational number is one which can be expressed as the ration of two definite integers: for example 1.5, but not √2).

What is the smallest possible perimeter of such a rectangle, measured in inches?

**Happy Christmas** from *Enigmatic Code*.

[enigma480]

### Like this:

Like Loading...

Suppose the rectangle has sides measuring

xandy, and the perimeter and the area of the rectangle come to a whole numbern.Then we have:

Eliminating

yfrom the equations gives us the quadratic equation:which has roots at:

From which we see if

0 < n < 16then the roots are complex.At

n = 16we get:x = 4,y = 4And at

n = 17we get:x = (17 ± √17) / 4, each root is irrational and corresponds to one side of the rectangle.Setting:

x = (17 + √17) / 4andy = (17 – √17) / 4, we get:as expected.

Solution:The smallest possible perimeter is 17 inches.Here is a Python program based on the above analysis. It runs in 83ms.

Run:[ @repl.it ]