Brainteaser 1389: A redistribution of wealth
From The Sunday Times, 23rd April 1989 [link]
Etherdred the Every-ready had been unwise enough to promise to distribute among his four unworthy sons the contents of an old oak coffer which had subsequently turned out to contain the over-magnanimous sum of 405,405,135,015 talents and nothing else. As his own abacus had only eight significant but venerable beads, he summoned his astrologer, Easirede the Farsighted, for advice.
“I feel that once my fee is determined, the rest of the problem will fall into place. Let us suppose His Majesty’s generosity extends to granting me X talents, where X is a whole number. I see that His Majesty has already divided all of the money into four unequal heaps, one for each son. Now, adding undoes subtraction. So let us take X talents from Aardman’s heap and put X on to Beergutt’s heap. Also, multiplying undoes division, so let us divide Ceedigrin’s heap by X and mutliply Dampfish’s by X. Each son will then have the same amount. After X talents has been paid to me from the remainder His Majesty can keep the rest”.
The redistribution was made as the astrologer suggested and he left the castle only to be robbed of his X talents by a disgruntled Aardman a mile down the road.
How many talents were received by each son under the new distribution?
[teaser1389]





Jim Randell 10:26 am on 21 January 2024 Permalink |
If we start with T talents, and in the end distribute N to each of the 4 sons, and X to the astrologer, then:
And the initial piles were:
And these are all different positive integers, which sum to T.
Hence:
So we can determine values for X by looking at squares that are divisors of T.
from enigma import (divisors, div, printf) T = 405405135015 # consider divisors of T for X in divisors(T): if X < 2: continue # is the square of X also a divisor? X2 = X * X if X2 > T: break d = div(T, X2) if d is None: continue X -= 1 # calculate N N = X * d # and the initial piles ps = (N + X, N - X, N * X, div(N, X)) if any(p is None or p < 1 for p in ps) or len(set(ps)) != 4: continue assert sum(ps) == T # output solution printf("X={X} -> N={N} ps={ps}")Solution: Each son received 135045000 talents.
So each son receives 0.033% of the total.
And the astrologer receives a modest 3000 talents, which is 0.00000074% of the total.
And so Etherdred keeps 99.87% of the total.
Although A mugged the astrologer, C has lost much more by his scheme.
If we factorise T we get:
So we see that X = 3000 is the only viable candidate.
LikeLike