Sunday Times Teaser 3326 – Interesting Figures
By Andrew Gibbons
Published Sunday June 21 2026
At a cricket match, Tom Leggie bowled fewer than 100 overs (O), of which fewer than 10 were maidens (M), took more than one but fewer than 11 wickets (W), and had an average of runs conceded per over (R/O) that was less than 6. I noticed something interesting about his bowling analysis (O-M-R-W): writing the numbers together with no gaps or overlap, then reading from right to left, they comprised a perfect square followed immediately by a prime containing the same number of digits, and they could also be read (again in their entirety, right to left) as a prime number followed by a perfect square number containing more digits. None of the perfect squares or primes was a single digit, and no zeros were involved.
What was Tom’s bowling analysis (O-M-R-W)?
When someone (i.e. Brian) produces a great solution it’s easy to come up with some tweaks which may be an improvement. Here’s a stab at that:
Hi John,
I did conclude that the rarity of squares when compared with primes would make for a faster solution but didn’t go further with this so it good to see that you have followed this approach up.
I also feel my original code is somewhat ‘over engineered’ and deserves simplification so I have come up with this as an alternative: