## Problem 1

A man, being asked the ages of his two sons, replied: “Each of their ages is one more than three times the sum of its digits.” How old is each son?

### Solution

If $x$ and $y$ are the digits in the age, we have $10x+y = 1+3(x+y)$. The only solution to the equation $7x-2y=1$ is $(x,y)=(1,3)$. Therefore, both sons have the age $13$.

## Problem 2

When asked the age of his brother, Ralph replied, “Jim’s age, like mine, is one more than eight times the sum of its digits”. How old is Jim?

### Solution

If $x$ and $y$ are the digits in the age, we have $10x+y = 1+8(x+y)$. The only solution to the equation $2x-7y=1$ is $(x,y)=(4,1)$. Therefore, both sons have the age $41$.

## Problem 3

A father asked his precocious son, “Do you know how old your grandfather is?”. “Yes”, replied the son, “his age, like mine, is more than five times the sum of its digits.” How old are the son and the grandfather?

### Solution

If $x$ and $y$ are the digits in the age, we have $10x+y = 1+5(x+y)$. The solutions to the equation $5x-4y=1$ are $(x,y)=(1,1)$ and $(x,y)=(5,6)$. Therefore, age of the grandfather is $56$.

## Problem 4

A man passed one-sixth of his life in childhood, one twelfth in youth, and one-seventh as a bachelor. Five years after his marriage, a son was born who died four years before his father at half his father’s final age. How long did the father live?

### Solution

Let the father’s age at the time of death be $x$. We have

$$\frac{x}{6} + \frac{x}{12} + \frac{x}{7} + 5 + \frac{x}{2} + 4 = x$$

Therefore the father lived till the age of $84$.

## Problem 5

Larry, Curly and Moe had an unusual combination of ages. The sum of any two of the three ages was the reverse of the third age. All were under $100$ years old. What was the sum of the three ages? If Larry was older than either of the others, what was the youngest he could be?

### Solution

Let $ab$, $cd$ and $ef$ be the ages of Larry, Curly and Moe. We have the following equations

$$10a + b + 10c + d = 10f + e\ 10c + d + 10e + f = 10b + a\ 10e + f + 10a + b = 10d + c\$$

From the above we have the equation

$$19(a+c+e) = 8(b+d+f)$$

It is easy to see that $b+d+f=19$ and $a+c+e=8$. Therefore, the sum of the ages is $99$. Here are the possible ages of Larry, Curly and Moe when they are all different:

$$(54, 27, 18) \ (45, 36, 18)$$

Therefore, the youngest Larry can be is $45$ if he was older than either of the others.

### Computational Solution

from itertools import product
reverse = lambda x: int(str(x)[::-1])
for l,c,m in product(range(1,100), range(1,100), range(1,100)):
if l+c == reverse(m) and l+m == reverse(c) and c + m == reverse(l):
if l != c and c !=m and m != l:
print(sorted([l,c,m], reverse=True))


## Problem 6

A young lady’s age is the reverse of the age of her grandmother. Each age is the product of two primes and the difference of each pair of primes is prime. How old are the women?

### Computational Solution

The lady is $26$ years old and her grandmother is $62$ years old.

from itertools import combinations

reverse = lambda x: int(str(x)[::-1])
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
for u,v in combinations(primes,2):
for s,t in combinations(primes,2):
if u*v == reverse(s*t) and abs(u-v) in primes and abs(s-t) in primes \
and u*v <= 100 and s*t <=100:
print(u*v, s*t)



## Problem 7

Larry handed back the photo. “Your two boys and Judy, eh?” he commented. “I guess she’s a teenager now.” “That’s right, and their ages make a neat little teaser for you,” Jim replied. “The reciprocal of the square of her age equals the difference between the reciprocals of the squares of the ages of her brothers.” How old was Judy.

### Computational Solution

from itertools import combinations
from fractions import Fraction

teen_ages =[13,14,15,16,17,18,19]

for t in teen_ages:
for u,v in combinations(range(1,100),2):
if Fraction(1, t*t) == (Fraction(1, u*u) - Fraction(1, v*v)):
print(t, u, v)


Judy is $15$ years old and her brothers are $12$ and $20$ years old.

## Problem 8

Grandpa is $100$ years old and his memory is fading. He remembers last year - or was it the year before that? - there was a big birthday party in his honor, each guest giving him a number of beads equal to his age. The total number of beads was a five-digit number, $x67y2$, but to his chagrin he cannot recall what $x$ and $y$ stand for. How many guests were at the party?

### Computational Solution

from itertools import product

for x, y in product(range(1,10), range(10)):
bead_cnt = 10000*x + 6000 + 700 + 10*y + 2
if bead_cnt % 99  == 0:
if bead_cnt % 98  == 0:


The total bead count is $56742$, the grandfather’s age at the time of the party was $98$ and the number of guests at the party was $579$.

## Problem 9

Two mathematicians were seeing each other again for the first time in many years. One said, “Since I last saw you, I have had three children.” “Well,” said the other, “What are their ages?” “The product of their ages is $36$, and the sum of their ages is the same as your house number,” replied the first. The second thought for a moment and then said that he would need more information. “Oh, the oldest one looks like me,” the first added, whereupon his friend quickly figured out their ages. What were the ages of the three children?

### Solution

The set of integer $3$-tuples whose product is $36$ is given below:

Age 1Age 2Age 3Sum
113638
121821
131216
14914
16613
22913
23611
33410

If the house number of the second mathematician is any number other than $13$, the second mathematician would have identified the ages of the children without needing any additional information. The ages of the children are therefore $9,2,2$ given that there is only one child who is the oldest.

## Problem 10

One morning after church the verger, pointing to three departing parishioners, asked the bishop, “How old are those three people?” The bishop replied, “The product of their ages is $2450$, and the sum of their ages is twice your age.” The verger thought for some moments and said, “I’m afraid I still don’t know.” The bishop answered, “I’m older than any of them.” “Aha!” said the verger. “Now I know.” How old was the bishop? (Ages are in whole numbers of years and no one is over $100$.)

### Solution

For every other tuple $(p1,p2,p3)$ of the ages of the parishioners apart from $(5,10,49)$ and $(7,7,50)$, the sum of the ages is unique and the verger could have identified the ages. The age of the bishop would have to be greater than $49$ which is the smaller of the two maximum ages of the two tuples. If the age of the bishop is greater than $50$, the verger wouldn’t get any additional information to narrow down the ages of the parishioners. Therefore, the bishop is $50$ years old.

Age 1Age 2Age 3Sum
12598124
13570106
14950100
2254976
2352572
5598108
577082
5104964
775064
5143554
7103552
7142546

### Computational solution

from itertools import product
from collections import defaultdict

ages_same_sum = defaultdict(set)
for p1,p2,p3 in product(range(1,100), range(1,100), range(1,100)):
if p1*p2*p3 ==2450:

for k,v in ages_same_sum.items():
print(k,v)


## Problem 11

A fairly young man was married at the beginning of the month. At the end of the month his wife gave him a chess set for his birthday. If he was married and received the chess set on the same day of the week he was born, how old was he when he got married?

## Problem 12

Miss Cohen is in her prime. Today is her birthday and her age is (as it was last year) the product of two primes, $p1$ and $p2$. The difference $p1 − p2$ is the product of two other primes, $p3$ and $p4$, but $p3 − p4 = p5$ where p5 is a fifth prime. Assuming that Miss Cohen’s age is less than a century, determine her age.

## Problem 13

A man was $x$ years old in the year $x^2$. How old was he in $1960$?

## Problem 14

When Ernie was as old as Bert is now, Bert’s age was half of Ernie’s present age. When Bert will be as old as Ernie is now, the sum of their ages will be $99$. Find Bert’s present age.

## Problem 15

In the year $2000$, if I live that long, my age will be a perfect cube, and my son’s age a perfect square. Not too many years ago the situation was reversed. How old are we?

## Problem 16

Hanging over a pulley is a rope with a weight at one end. At the other end, there is a monkey of equal weight. The rope weighs $250$ gm per meter. The combined ages of the monkey and its father total $4$ years, and the weight of the monkey is as many kilograms as his father is years old. The father is twice as old as the monkey was when the father was half as old as the monkey will be when the monkey is three times as old as the father was when he was three times as old as the monkey was. The weight of the weight plus the weight of the rope is half as much again as the difference between the weight of the weight and the weight of the weight plus the weight of the monkey. How long is the rope?

## Problem 17

In a number of years equal to the number of times a pig’s mother is as old as the pig, the pig’s father will be as many times as old as the pig as the pig is years old now. The pig’s mother is twice as old as the pig will be when the pig’s father is twice as old as the pig will be when the pig’s mother is less by the difference in ages between the father and the mother than three times as old as the pig will be when the pig’s father is one year less than twelve times as old as the pig is when the pig’s mother is eight times the age of the pig. When the pig is as old as the pig’s mother will be when the difference in ages between the pig’s father and the pig is less than the age of the pig’s mother by twice the difference in ages between the pig’s father and the pig’s mother, the pig’s mother will be five times as old as the pig will be when the pig’s father is one year more than ten times as old as the pig is when the pig is less by four years than one-seventh of the combined ages of his father and mother. Find their respective ages. (For the purposes of this problem, the pig may be considered to be immortal.)

## Problem 18

In a family with 6 children, the five elder children are respectively 2, 6, 8, 12, and 14 years older than the youngest. The age of each is a prime number of years. How old are they? Show that their ages will never again all be prime numbers (even if they live indefinitely).

## Problem 19

“How old is grandfather?” David asked. His father replied, “His age, like mine, is one more than six times the sum of its digits.” How old is David’s grandfather?

## Problem 20

On his birthday in $1975$, John reaches an age equal to the sum of the digits in the year he was born. What year was that?

## Problem 21

“I see that the sum of your children’s ages is $36$, the same as mine,” said Alice to Barbara, “and the product of their ages is also the same as the product of my children’s ages.” “Then I know the ages of all the children, but of course I don’t know which family is which,” said Carol, who is known as a lightning calculator. “Well, my son is the oldest of all the children,” said Barbara. What are the ages of the children?

## Problem 22

Over the punchbowl, my host said, “Having been married on the twenty-ninth of February, we don’t get to celebrate our anniversary very often: in fact this is only the fifth one. I usually ask visiting mathematicians to determine the ages of my three children given the sum and product of their ages, but since Professor Smith failed tonight, and Professor Jones also failed at our last party, I am going to let you off.” “Oh, don’t do that,” I replied, “I have already heard all the information I will need.” How old were the children?

## Problem 23

“The Product of the ages of my three children is less than 100,” said Bill, “but even if I told you the exact product and even told you the sum of their ages you still couldn’t figure out each child’s age.” “l would have trouble if different ages are very close” said John as he looked at the children, “but tell me the product anyway.” Bill told him and John confidently told each child his age. If you can now also tell the three ages, what are they?