The sum of the ages of my three children is 40. Though the ages of my two daughters are relatively prime (i. e. they have no common divisor), the age of each of them does have a common divisor greater than 1 with my son´s age.

How old are my three children?

  • $\begingroup$ @Think of the three children's ages as the vertices of a graph, two of which are joined by an edge if and only they have a common divisor. Nothing to do with graph theory? $\endgroup$ – Bernardo Recamán Santos May 15 '18 at 16:43
  • $\begingroup$ For a moment, this sounded very familiar. ;) $\endgroup$ – gnovice May 15 '18 at 19:55

The ages are:

7, 12, 21

In order to see this,

let $a$ and $b$ be the ages of your daughters, and let $c$ be the age of your son. We now that $a$ and $c$ have a common divisor, from this it follows that they also have a common prime divisor, let this prime divisor be $p$. Similarly, $b$ and $c$ have a common prime divisor $q$. We assume that $p \leq q$.

Because $a$ and $b$ are coprime, we have that $p$ does not divide $b$, from this it also follows that $p$ does not divide $a + b + c = 40$. Similarly, $q$ does not divide 40 either.

It also follows that $pq$ is a divisor of $c$, so $c \geq pq$, similarly $b \geq q$. We also have that $p \geq 3$ because $p$ is a prime that does not divide 40. This means that $40 = a + b + c \geq q + pq \geq 4q$. This means that $q \leq 10$.
So $p$ and $q$ are two primes not dividing 40 with $p < q \leq 10$. This is only possible if $p = 3$ and $q = 7$. So $c$ is a multiple of $21$, and therefore $c = 21$. It follows that $a + b = 19$, and $a$ is divisible by 3 and $b$ is divisible by $7$. This is only possible if $a = 12$ and $b = 7$. So this are the only possible ages of the children.

The above implicitly assumes that all ages are non-zero. If we drop this assumption, we get some more solutions (Although I do not think this is intended):

3, 37, 0
7, 33, 0
9, 31, 0
11, 29, 0
13, 27, 0
17, 23, 0
19, 21, 0


I say the ages are:

1,2,37. The son's age is 1, and the daughter's ages are 2 and 37. Neither 2 and 37 have common divisors, but the son's age (1) is a common divisor of the daughter's ages (as well as all numbers).


I think though that this answer does violate the spirit of the puzzle, as 1 is usually not considered a divisor in this sense, and if we assume that it is, then it violates the answer as well because 1 is a divisor for all three numbers.

  • 2
    $\begingroup$ If 1 is a common divisor, your answer violates the condition that the age of the sisters has no common divisor. If 1 is no common divisor, than the age of the sisters has no common divisor with the age of the son. $\endgroup$ – Nova May 15 '18 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.