Enigmatic Code

Programming Enigma Puzzles

Category Archives: enigma

Enigma 551: Mileage mix up

From New Scientist #1704, 17th February 1990 [link]

When I sold my old car last week I noticed something odd about the total mileage (a five figure number) displayed on its milometer: if the digits in this number were summed they formed a perfect square. Also, the results of multiplying this square by the original number was to give a figure which was an exact multiple of the number formed by reversing the digits in the mileage. Furthermore, if the square was multiplied by this reverse number, it gave a figure which was an exact multiple of the mileage.

However, the really strange thing was that when I bought my new car, which had a lower mileage than my old car, exactly the same properties applied to its total mileage. Neither of the totals were divisible by 10 or palindromic (that is, the number formed by reversing the digits was different to the original mileage but also had five figures)

What were the total mileages of: (a) my old car; (b) my new car?


Enigma 958: Three churches

From New Scientist #2113, 20th December 1997 [link]

In George’s small home town there are three churches, equidistant from each other as the crow flies — that is to say, the stand at the vertices of an equilateral triangle. George is standing exactly 1 mile in a straight line from one church, 5/8 mile from the second and just 3/8 mile from the third.

Exactly how far apart are the churches from each other?


Enigma 550: Do your level best

From New Scientist #1703, 10th February 1990 [link]

Bern, Cara and Loren are climbing in the Hillymayas and have decided to tackle Mount Veryrest which is 700 metres high. There are three different approaches and they each take a different one. Bern’s approach is shown in the diagram.

All slopes in the Hillymayas have the same steepness — 1 up or down for 1 across; all climbers go at the same pace — 100 metres up or down in each hour. Thus, Bern could reach the top in 13 hours.

Bern’s approach is described as: up 5, down 3, up 5.
Cara’s approach is: up 3, down 2, up 4, down 1, up 3.
Loren’s approach is: up 5, down 2, up 3, down 6, up 7.

The three decide that, to be fair, they will climb so that, at each point in time, all three are at the same height. This will involve some retracing of steps. Given that condition, they try to reach the top as soon as they can.

How may hours does it take them to reach the top?


Enigma 959: Christmas greetings

From New Scientist #2113, 20th December 1997

This year I have experimented with my own design of Christmas card. I started with a rectangle of white card and some identical right-angled triangles.

I slid one of the triangles around on the card with the two acute-angled vertices alway touching the perimeter, as shown below, hoping to spot some aesthetic position in which to glue it.

I noticed that one each circuit around the perimeter the right-angled vertex moved only five-sixths as far as each of the other two vertices.

I eventually settled in the design shown below, consisting of six of the non-overlapping triangles pasted on to the card.

What proportion of the card was covered by the triangles?


Enigma 549: Prime pairs

From New Scientist #1702, 3rd February 1990 [link]

The twenty children on the school trip had labels on their lapels. The numbers from 1 to 20 inclusive were written on the labels, one number on each label.

The twenty children were told to form pairs. I noted that the average number of each pair was prime. And when I noted the ten primes obtained in this way I saw that the primes which occurred each occurred a different number of times.

List the ten pairs.


Enigma 960: Squares into squares

From New Scientist #2115, 3rd January 1998

Harry and Tom were trying to find a set of three 3-digit perfect squares which between them used nine different digits.

Harry found such a set and also discovered that if he took his one unused digit and the three digits of one of his squares he could arrange them to form a 4-digit perfect square.

(1) What was this 4-digit perfect square?

The best that Tom could manage was to find a 2-digit perfect square and two 3-digit perfect squares which between them used eight different digits. But he also discovered that if he took either one of his two unused digits and the digits of either of his two 3-digit squares he could arrange them to form a 4-digit perfect square.

(2) List in ascending order the four 4-digit perfect squares that Tom could form.


This puzzle completes the archive of Enigma puzzles from 1998. There is now a complete archive of New Scientist puzzles from the start of 1998 to the end of 2013, and also from June 1975 to January 1990, a total of 1565 puzzles available. There are 414 Enigma puzzles remaining to post.


Enigma 548: A magic hexagon

From New Scientist #1701, 27th January 1990 [link]

In some circles, the Magic Hexagon is well known, and I give it here:

Each of the straight lines, whether of three, four or five numbers, in this hexagon adds up to 38. This is the only solution using the numbers 1 to 19.

Can you find a Magic Hexagon with nineteen positive integers, all different, so that:

(1) The numbers down the central column are consecutive, increasing, and as small as possible;
(2) The largest number is where the 19 is in the hexagon above;
(3) The number 31 does not occur in the hexagon;
(4) And, of course, the fifteen straight lines of numbers have the same sum?


Enigma 961: Alphabetical hockey

From New Scientist #2117, 10th January 1998

There are 20 teams in our local hockey league, with the quaint 1-letter names, A, B, C, D, E, …, S, T. Last season, every team played every other team exactly once and there were no draws. Looking at the last season’s results, I noticed that if I choose any match then the winning team beat every team that occurs later in the alphabet than the losing team.

(1) Can you also say for certain that if I choose any match then the losing team lost to every team that occurs earlier in the alphabet than the winning team?

(2) Can you say for certain who won the match K vs O? If you can, name the winner.

I also noticed that at least 10 of the matches were won by the team that occurs later in the alphabet.

(3) Can you say for certain who won the match L vs M? If you can, name the winner.


Enigma 547: Just a bite

From New Scientist #1700, 20th January 1990 [link]

The young apprentice finally summoned the nerve to ask Ted why he always pored over a pile of old diaries at lunch time.

“Well now”, Ted replied, “y’see when Alf ‘ere were apprentice ‘e asked me one day didn’t I get bored of ‘avin’ the same old fillin’s in me san’iches day after day. ‘Course not’, I told ‘im. Well, it’s not that bad, see, as I can change the order I eats ’em. An’ my missus cuts each one in ‘alf, diagonal like, so I gets more variety. If I ‘ad two san’iches I could eat ’em like: cheese, cheese, ‘am, ‘am; or ‘am, cheese, cheese, ‘am; or — well, you gets the idea. Well, ever since Alf joined the company I’ve kept a record of ‘ow I ate ’em. An’ I’ve ‘ad a different combination every day so far. Though I do reckon there’s only a few more ways to mix ’em before I eats ’em in a pattern as ‘ow I’ve ate ’em before”.

Alf took up the theme. “Ted got me doin’ t’same thing at first. I always ‘ave t’same fillin’s every day too, an’ like ‘im each butty’s different. But I ‘as one more butty than Ted. After a few year I realised I couldn’t ‘ope to keep track of all t’possibilities, so I gave up”.

How many combinations are available to Alf?


Enigma 962: What’s the difference

From New Scientist #2117, 17th January 1998

This is one of those usual letters-for-digits puzzles where the digits, 1-9, are consistently replaced by different letters. It arose when I was testing my young nephew on his newly learnt arithmetic.

“Is SEVEN odd or even?” I asked. “Odd”, he replied.

“Is EIGHT odd or even?” I asked. “Even”, he replied.

“And what do I get if I take SEVEN away from EIGHT?” I asked.

After some hesitation he replied “LESS”!

What number does EIGHT represent?


Enigma 546: Concede or score

From New Scientist #1699, 13th January 1990 [link]

The Midchester football league contains four teams: Albion, Town, United and Victoria. In the season that has just finished, each team played every other team once, and the matches were played on three consecutive Saturdays. For each team, the Guardian Chronicle has printed that team’s performance through the season in the form of a list of all the goals scored in that team’s matches in chronological order. The list for a team states whether each goal was conceded, C, or scored, S, by that team. The list does not indicate where one match ends and the next begins.

Albion – C S C C S C C C S
Town – S S S S S C C S S
United – S C C S C C
Victoria – C C C S S S S C

Give the scores in Albion’s three matches in chronological order.


Enigma 963: Fruity diet

From New Scientist #2118, 24th January 1998

In the interest of a healthier lifestyle, George has decided to buy some fruit every week — but he is starting gradually.

The first week, when he gets his pay-packet, he buys and eats an apple. The second week, he buys and eats an orange. The third week, he buys and eats a banana.

In every subsequent week he buys and eats the same items of fruit as he consumed in the previous three weeks combined, and in the same order. Thus the first six weeks, in order, are:


You will quickly discover that this story is quite incredible, but if it could be believed, what would be the one-millionth piece of fruit consumed, and in which week?


Enigma 545: Identikit

From New Scientist #1698, 6th January 1990 [link]

Five witnesses got a good view of an escaping burglar and helped to compose an identikit picture. Their five descriptions were:

1. Dark-haired, small nose, bearded, small eyes, thin-faced;
2. Fair-haired, large nose, bearded, small eyes, thin-faced;
3. Dark-haired, large nose, clean-shaven, small eyes, thin-faced;
4. Bald, large nose, clean-shaven, large eyes, fat-faced;
5. Fair-haired, small nose, bearded, large eyes, thin-faced.

Each feature was correctly described by at least one witness, and all five witnesses got the same number of features correct.

Describe the burglar.


Enigma 964: Square root progressions

From New Scientist #2119, 31st January 1998

Certain 4-digit perfect squares can be formed by coupling a pair of smaller squares: a 1-digit square followed by a 3-digit square (such as 1225), or a 2-digit square followed by another 2-digit square (such as 1681) or a 3-digit square followed by a 1-digit square (such as 1444). Squares such as 1600 or 9025 are not eligible because the leading zero in front of 0 or 25 is not acceptable.

Harry, Tom and I each chose three eligible 4-digit squares. On each of our chosen squares we considered the square roots of the pair of coupled smaller squares. Harry multiplied each of his pairs of square roots and found that his three products could be arranged to form an arithmetic progression. Tom added each of his pairs of square roots and found that his three sums could be arranged to form another arithmetic progression. I subtracted the smaller square root from the larger square root of each of my pairs and found that my three differences could be arranged to form yet another arithmetic progression.

1. What was the 4-digit square that I alone chose?
2. What was the 4-digit square that all three of us chose?
3. What was the eligible 4-digit square that none of us chose?


Enigma 544b: Little puzzlers

From New Scientist #1696, 23rd December 1989 [link]

Amy, Beth, Jo and Meg decided to give each other pots of marmee-lade for Christmas. Each girl made a number of pots and then divided her pots into three piles, which were not necessarily equal; then she wrapped up each pile, labelled each parcel, and put them under the Christmas tree. The total number of pots involved was between 50 and 100.

We will let the letters A, B, C, …, I stand for the digits 1, 2, 3, …, 9 in some order. Amy gave D/F of her pots to Jo, and C/B to Meg. Beth gave H/G of her pots to Amy, H/A to Jo, and D/G to Meg. Jo gave F/G of her pots to Amy. Meg gave A/B of her pots to Beth, and D/H to Jo.

On Christmas day, each girl opened the three parcels she had received. Amy received H/E of her pots from Beth, and F/E from Jo. Jo received D/I of her pots from Amy, D/H from Beth and D/A from Meg.

Note that all the fractions were in reduced form before letters were substituted (1/2 and 2/3 are in reduced form, whereas 4/8 and 6/9 are not).

What was the total number of pots that were given?


This puzzle completes the archive of Enigma puzzles from 1989. There is now a complete archive of New Scientist puzzles from July 1975 to December 1989, and from February 1998 to December 2013, a total of 1553 puzzles. There are 423 Enigma puzzles remaining to post.

[enigma544b] [enigma544]

Enigma 965: Square ring

From New Scientist #2120, 7th February 1998

I have a set of one hundred cards that are numbered 1, 2, …, 100 and I try to make various patterns with some of them.

For example consider the cards here. Starting at 25 and reading each adjacent pair clockwise as one number gives the squares: 256, 64, 49, 961.

However, the pattern fails at the end because the number 6125 is not a perfect square.

Your task today is to use some neat logic to find a ring of more than two of the cards so that each followed by the next clockwise forms a square.

What is this ring? (With the lowest number at the top).


Enigma 544a: Merry Christmas

From New Scientist #1696, 23rd December 1989 [link]

Arranging and displaying the Christmas cards is always a problem. This year all our cards are either 10cm × 20cm or 20cm × 10cm. We managed to arrange them together like a jigsaw, just covering (without overlapping) a square piece of paper.

Then we found that there was no convenient place to display the square so we decided to cut it either horizontally or vertically into two rectangles. But no matter how we tried it was impossible to do this without cutting through at least one of the cards. So we cut the square into two rectangles in such a way that we had to cut through the minimum number of cards, but it still meant that we cut over five per cent of our cards.

How many cards did we receive this year, and how many did we cut?

Enigma 192 was also called “Merry Christmas”.

[enigma544a] [enigma544]

Enigma 966: Prime tennis

From New Scientist #2121, 14th February 1998 [link]

At tennis a set is won by the first player to win 6 games, except that if it goes to 5 games all it is won either 7 games to 5 or 7 games to 6. (As far as this puzzle is concerned this applies even to the final set).

The match that we are considering went to 5 sets and no two sets contained the same number of games. At the end of each set the total number of games played up to that point was always a prime number. From this information the score in one or more of the five sets can be deduced with certainty.

Which sets had a score that can be deduced with certainty, and what was the score in each of the sets concerned?


Enigma 543: Spires point the way

From New Scientist #1695, 16th December 1989 [link]

The quiet town of Spirechester is divided into nine square parishes as shown on the map. Each parish church has its spire precisely at the centre of the parish, and these are marked by crosses on the map.

Enigma 543

The churches are named after St Agnes, St Brigid, St Cecilia, St Donwen, St Etheldreda, St Felicity, St Genevieve, St Helen and St Isabel. Each spire is topped by a weather vane which has, instead of a cock, the initial letter of its saint’s name.

Recently I walked in the meadows which surround the town and took a number of photos from different positions. Fortunately, no spire was ever hidden by another spire and the wind was such that the weather vane letters were clearly visible. However, I was not sufficiently distant from the town to capture all nine spires and, in fact, each photo contains just five spires. The orders of the spires of the photos, reading from left to right, were GEIAC, EACHD, EACDH, AECHD, IFCGB.

Starting with A (for St Agnes) list the eight churches in clockwise order around the outside of the square.


Enigma 967: Prime cubes

From New Scientist #2122, 21st February 1998 [link]


George has 27 small blocks which have been identified with 27 different prime numbers — each block has its number on each face. He has assembled the blocks into a 3×3×3 cube, as shown. On each of the three visible faces, the nine numbers total 320 — but this is not true of the three hidden faces.

George remembers that when he bought the blocks they were assembled into a similar 3×3×3 cube, but on that occasion they showed the same total on each of the six faces, this being the smallest possible total if each block has a different prime number.

What was the total on each face when George bought the blocks?


%d bloggers like this: