Sunday Times Teaser 3089 – An Old Square
by Colin Vout
Published Sunday December 05 2021 (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?
2 Comments
Leave one →
-
Brian Gladman permalink123456789101112131415# major unit (mju) = <m> minor units (mnu)for m in range(2, 11):# the minor units in a sidefor s_mnu in range(1, m):# the major units in a sidefor s_mju in range(1, s_mnu):# the side length in minor unitsside = s_mju * m + s_mnu# the square area in major (mju^2) and minor (mnu^2) unitsa_mju2, a_mnu2 = divmod(side ** 2, m ** 2)if a_mnu2 == 15:print(f"side = {side} mnu = {s_mju} mju + {s_mnu} mnu, "f"area = {a_mju2} mju^2 + {a_mnu2} mnu^2, mju = {m} mnu")
-
GeoffR permalink123456789101112# x units per major unit a, and b minor unitsfor a in range(1, 11):for b in range(a + 1, 11):for x in range(b + 1, 11):# side in minor unitsS = a * x + b# The area is a certain number of square major units# plus a remainder of 15 square minor unitsif S ** 2 % (x * x) == 15:print(f"Side in minor units = {S}")