### Random Post

### Recent Posts

### Recent Comments

Jim Randell on Tantalizer 452: Snailspaces | |

Brian Gladman on Enigma 1061: Par is never… | |

Hugh Casement on Enigma 1061: Par is never… | |

Jim Randell on Enigma 1061: Par is never… | |

geoffrounce on Puzzle 47: Digits all wro… |

### Archives

### Categories

- article (11)
- enigma (1,175)
- misc (2)
- project euler (2)
- puzzle (44)
- site news (46)
- tantalizer (48)
- teaser (3)

### Site Stats

- 183,007 hits

Advertisements

This Python program runs in 104ms.

Solution:Last years stated ages were 3, 3, 3; This years stated ages were 6, 15, 87.The problem reduces to finding (p, q, r) such that p² + q² + r² = p×q×r, with numbers from 1 to 100.

There are five triples:

(3, 3, 3)

(3, 3, 6)

(3, 6, 15)

(3, 15, 39)

(6, 15, 87)

The only triple with all the numbers the same is (3, 3, 3), and the only triple that doesn’t include 3 is (6, 15, 87).

Here’s another version that considers fewer combinations. Supposing p < q < r, it considers pairs of values for p and q, and then looks for solutions of the quadratic equation:

p² + q² + r² = pqr

⇒ r² + (-pq)r + (p² + q²) = 0

It runs in 47ms.