## Brain-Teaser 472

**From The Sunday Times, 14th June 1970** [link]

The monogamous and aptly named state of Swindlonabad has a number of inflexible marital laws, these being that:

(a) Each male citizen must marry on his 21st birthday.

(b) Each married man must contribute on his wedding day and each subsequent birthday to an Inheritance Trust which must be maintained at exactly the number of shekels equal to the square of the number of years he has lived.

(c) When an individual’s trust fund can be precisely divided among all his legitimate unmarried sons, each son receiving a number of shekels equal to the square of that son’s age, the father retires and he and his family are maintained by the state.

Now Abdul the Prolific fathered a child during each year of his married life, and all of these children survived to attend his retirement revels. Although only two of his many children were girls, he complained bitterly that such a misfortune should overtake him twice in a decade. At the time of his retirement only one of his daughters was under the age of ten.

How old were the two daughters at that time?

[teaser472]

## Jim Randell 11:46 am

on14 April 2019 Permalink |Let’s consider the situation where Abdul is married for 21 years or more (i.e. his age is at least 42).

Children over 20 have no claim on the trust fund, so he will have children with ages, 0, 1, 2, 3, …, 20. But two of them are girls, one of which is under 10, and the other is up to 10 years older than that, and they will have no claim.

This Python program runs in 80ms.

Run:[ @repl.it ]Solution:The daughters were 9 and 17.Abdul retired on his 50th birthday, so his trust fund was 2500 shekels.

He also had 29 children, one born every year from his 21st year to his 49th year.

So the children’s ages range from 0 to 28. The daughters are aged 9 and 17, and only those sons aged less than 21 have a claim on the fund.

And we can verify that the total claim is the same as the amount in the trust fund:

The following code shows the total amount in the trust fund, the ages of the claimants and the total claim on the fund on each of Abdul’s birthdays from 21 to 50:

Which gives the following output:

and here it is as a graph:

LikeLike