Teaser 2450: [Triangle squares]
From The Sunday Times, 6th September 2009 [link]
Geomotto’s latest painting celebrates Napoleon, who was quite a mathematician. The painting consists of a triangle of area a whole number of square feet, but less than a square yard. One of its sides is one yard long. On each of the other two sides sits a square with its side equal in length to the triangle’s side.
The area of the triangle and the smaller square together equals the area of the larger square. Furthermore, if you write down the area of the smaller square in square inches, then the digits can be arranged to give the area of the larger square.
What are the two squares’ areas?
This puzzle was originally published with no title.
[teaser2450]
Jim Randell 7:31 am on 10 March 2026 Permalink |
Working in units of inches:
If the area of the triangle is A (square inches), and we consider the triangle to have sides of (36, x, y) (where x < y).
Then we can calculate the height of the triangle above the 36 side:
And now suppose the height splits the base into (18 − z) on the x side, and (18 + z) on the y side. Then we have:
Subtracting:
But we are told:
So, for any given value of A we can calculate the values of x² and y², and look for values that use the same digits, and there are only a few values of A to check.
This Python program runs in 78ms. (Internal runtime is 136µs).
from enigma import (irange, rdiv, nsplit, sq, sqrt, triangle_area, printf) # area = A is a whole number of square feet < 9 for n in irange(1, 8): A = 144*n (h, z) = (rdiv(A, 18), rdiv(A, 72)) # = (8 * n, 2 * n) (x2, y2) = (sq(18 - z) + sq(h), sq(18 + z) + sq(h)) # x^2 and y^2 are anagrams of each other if not (sorted(nsplit(x2)) == sorted(nsplit(y2))): continue # check for a valid triangle, with the correct area T = triangle_area(36, sqrt(x2), sqrt(y2)) if T is None or abs(A - T) > 1e-6: continue # output solution printf("x^2={x2} y^2={y2} [A={A} h={h} z={z} T={T:.3f}]")Solution: The areas of the squares (in square inches) are: 2340 and 3204.
LikeLike