### Random Post

### Recent Posts

- Enigma 415: Buses galore
- Puzzle 65: Division: figures all wrong
- Enigma 1097: Chessboard triangles
- Enigma 414: Nicely bungled, Sir!
- Tantalizer 473: Pigeon post
- Enigma 1098: Soccer heroes
- Enigma 413: Quargerly dues
- Puzzle 66: Hopes and successes on the island
- Enigma 1099: Unconnected cubes
- Enigma 412: A triangular square

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,106)
- misc (2)
- project euler (2)
- puzzle (27)
- site news (43)
- tantalizer (27)
- teaser (3)

### Site Stats

- 164,322 hits

Programmatically we can examine all 4-digit numbers, look for ones with 5 distinct prime factors, and then assign them to ages to fit the conditions (which is how I wrote my first program). This Python program takes a more efficient approach. It runs in 34ms.

Solution:The PIN is 9570.The ages are 15, 22 and 29. Which have factors of (3, 5), (2, 11) and (29).

Another variation

HI Arthur,

When the five prime factors are split among the three ages, they can split (1,1,3) or (1,2,2). How did you eliminate the (1,1,3) split?

Although I can see why F and H can only have one or two prime factors, I am not sure why G cannot have three prime factors (c.f. the ‘G in candidates’ test and the only one of (F,G,H) is prime test).

Good point, I hadn’t thought of the 1,1,3 split.

Here is a further development of Arthur’s approach that runs on Python 3. It uses my Python number theory library but can be modified relatively easily to use Jim’s enigma.py.

Hi Geoff,

Isn’t your solution making the assumption that the middle number is a composite? As it turns out, the middle number of the solution is composite, but I’m not sure whether that can be assumed in the search.

Hi Arthur, Two can be a factor of only one of the three ages, and if it was a

factor of either the lowest or highest age, the middle age wouldn’t be

an integer. So, yes, the middle age has 2 as a factor, which makes it

composite (it can’t be 2)

Hi Geoff,

I still can’t see why 2 has to be a factor of the middle integer.

I have worked it out now – the smallest 5 primes other than 2 have a five digit product, 3*5*7*11*13=15015

In fact no prime factor can be greater than 47, as 2*3*5*7*48 = 10080

My memory is like a sieve – I had worked this out for my solution below but when you asked the question I couldn’t remember why! I am hence mightily relieved that you found the answer. I must remember to add more comments as I get older!

My, this one is popular! Mine is essentially the same as Jim’s.