# Sunday Times Teaser 2841 – Crenellation Aggregation

*by Stephen Hogg*

#### Published 5th March 2017 (link)

The castle’s crenellated outer walls formed a pentagon, and on a family visit we decided to count the crenels. My son counted the number on each side and found that these totals on each side were five consecutive two figure numbers. My daughter and wife started together and then one of them walked clockwise around the walls and the other walked anticlockwise. They each counted the crenels they passed until they met. Their totals were two different prime numbers (with no prime number between the two). I consulted the tourist leaflet and found that the total number of crenels was in fact the product of three prime numbers.

How many crenels were there in total?

5 Comments
Leave one →

Here’s my solution.

It considers pairs of consecutive primes, and runs in 39ms.

We could use a bit of analysis to reduce the range of primes we consider, but it doesn’t seem worth it.

The

enigma.pylibrary is available at [ http://www.magwag.plus.com/jim/enigma.html ].Here is a variation, based on the above approach of starting with adjacent primes:

The only unknowns in this teaser so far are the five consecutive 2-digit numbers.

If 5n + 10 = 410, then n = 80.

The five consecutive 2-digit numbers, therefore, are 80, 81, 82, 83 and 84.

I used simple prime no. generators to solve from scratch.

It would be appreciated if anyone could shorten or make it more efficient.

It runs pretty fast (less than a millisecond).