Teaser 3089: An old square
From The Sunday Times, 5th December 2021 [link] [link]
Archaeologists have excavated an ancient area that has the shape of a perfect square. Fragmentary documents give some information about its measurements: the number of major units along a side is less than the remaining number of minor units; there is a whole number of minor units in a major unit (no more than 10); and the area is a certain number of square major units plus a remainder of 15 square minor units.
Expressed just in terms of minor units, how many are there along a side?
[teaser3089]
Jim Randell 5:08 pm on 3 December 2021 Permalink |
If we suppose a major unit consists of x minor units (x ≤ 10), then the side of the square can be expressed as a major units plus b minor units (= ax + b minor units) where a < b < x.
The following Python program runs in 45ms.
Run: [ @replit ]
from enigma import (irange, subsets, div, sq, printf) # consider x minor units in a major unit (no more than 10) # consider a major + b minor units (a < b < x) for (a, b, x) in subsets(irange(1, 10), size=3): # the side of the square is (ax + b) (minor units) s = a * x + b # can s^2 be expressed as k x^2 + 15? k = div(sq(s) - 15, sq(x)) if k is not None: printf("x={x} a={a} b={b}; s={s} (= {a}x + {b}); s^2 = {k}x^2 + 15")Solution: The area is a square with each side measuring 41 minor units.
So the entire area measures 41 × 41 = 1681 minor units.
There are 7 minor units in a major unit (so the side of the square is 5 major + 6 minor units).
And the area of the square can be expressed as 34 square major + 15 square minor units.
LikeLike
Jim Randell 11:51 am on 4 December 2021 Permalink |
Or using the [[
SubstitutedExpression]] solver from the enigma.py library:LikeLike
Frits 3:28 pm on 4 December 2021 Permalink |
I have the feeling X might be logically determined as the Wolframalpha site for this equation only shows solutions for a specific positive X.
LikeLike
GeoffR 9:29 am on 5 December 2021 Permalink |
LikeLike
Jim Randell 9:54 am on 5 December 2021 Permalink |
@GeoffR: x is “no more than 10”, so [[
var 1..10: x;]] would be more appropriate.LikeLike
GeoffR 10:19 am on 5 December 2021 Permalink |
@Jim: Yes, correct. I was assuming x < 10.
Fortunately, it does not affect the answer.
LikeLike