Enigmatic Code

Programming Enigma Puzzles

Category Archives: enigma

Enigma 1014: Mirror image

From New Scientist #2170, 23rd January 1999

Harry was playing about with his calculator and keyed in a 4-digit number. He placed a mirror behind and parallel to the display, and added the reflected number, which was smaller, to the number on the display. This gave him a 5-digit sum.

He then again keyed in the original number, and this time subtracted the reflection from it.

He divided the sum by the difference and found that the quotient was a 4-digit prime.

What was his original number?


Enigma 495: Lack of details

From New Scientist #1647, 14th January 1989 [link]

Four football teams are to play each other once. After some of the matches had been played a document giving a few details of the matches played, won, lost and so on was found. This time I am glad to say that, although it was rather a mess, all the figures given were correct. Here it is:

Enigma 495

(Two points are given for a win and one point to each side in a drawn match).

Find the score in each match.


Enigma 1015: Money-spinner

From New Scientist #2171, 30th January 1999

In my local pub there is an electronic “slot machine” which offers a choice of various games. In one of them, called Primetime, after inserting your pound coin the 9 digits 1-9 appear in random order around a circle. Then an arrow spins and stops between two of the digits. You win the jackpot if the two-digit number formed clockwise by the two digits on either side of the arrow has a two-figure prime factor. So, if the digits and arrow ended up as above, you would win the jackpot because 23 is a factor of 92.

However, with the digits in the same position but with the arrow between 8 and 1 you wound not win.

I recently played the game. The digits appeared and the arrow started to spin. But I realised to my annoyance that, no matter where the arrow stopped, I could not with the jackpot.

Starting with 1, what is the clockwise order of the digits?


Enigma 494: Look blank

From New Scientist #1646, 7th January 1989 [link]

In the following long division sum I’ve marked the position of each digit. I can tell you that there were no 1s and no 0s but that all other digits occurred at least twice. Also (although you don’t actually need this information) all four digits of the answer were different.

Enigma 494

What is the six-figure dividend?


Enigma 1016: Semi(pr)imes

From New Scientist #2172, 6th February 1999

A semi-prime is the product of two prime numbers. Sometimes when the digits of a semi-prime are reversed, the resulting number is also a semi-prime: 326 and 623 (2 × 163 and 7 × 89 respectively) are both semi-primes. More rarely the sum of these two semi-primes is itself a semi-prime, as with 326 + 623 = 949 = 13 × 73.

In fact, 949 is the largest of very few three-digit semi-primes that have these characteristics; but two of the three-digit semi-primes that can be the sum of two semi-primes, of which one is the reverse of the other, are consecutive numbers.

Identify these two consecutive three-digit numbers and the sums that lead to them. (Give your answer in the form a = b + c and d = e + f, where d = a + 1).


Enigma 493b: Christmas cards

From New Scientist #1644, 24th December 1988 [link]

The five couples in Yuletide Close send cards to some of their neighbours. Some of them told me who (apart from themselves) send cards.

Alan: “The cards not involving us are the ones exchanged between Brian’s and Charles’s houses, the ones exchanged between Brian’s and Derek’s, the card from Charles to Derek (or the other way round, I’m not sure which) and the card from Brian to Eric (or the other way round).”

Brenda: “Apart from our cards, Alice and Emma exchange cards, as do Dawn and Christine, and Dawn sends Emma one.”

The Smiths: “The cards not involving us are the ones exchanged by the Thomases and the Unwins, those exchanged by the Williamses and the Vincents, the one from the Thomases to the Williamses and one between the Unwins and the Vincents (but I forget which way).”

No 3: “Nos 1 and 5 exchange cards, one card passes between Nos 2 and 4 (I don’t know which way) and No 2 sends one to No 1.”

Charles Thomas receives the same number of cards as he sends. On Christmas Eve, he goes on a round tour for drinks. He delivers one of his cards, has a drink there, takes one of their cards and delivers it, has a drink there, takes one of their cards and delivers it, has a drink there, takes one of their cards and delivers it, has a drink there, collects the card from them to him and returns home, having visited every house in the close.

Name the couples at 1-5 (for example: 1, Alan and Brenda Smith; 2, …).

Enigma 1321 is also called “Christmas cards”.

This completes the archive of Enigma puzzles from 1988. There is now a complete archive from the start of Enigma in 1979 to the end of 1988, and also from February 1999 to the final Enigma puzzle at the end of 2013. There are 1265 Enigma puzzles posted to the site, which is around 70.8% of all Enigma puzzles published.

[enigma493b] [enigma493]

Enigma 1017: Paint the line

From New Scientist #2173, 13th February 1999

Pussicato, the great artist, is starting his new commission. The canvas is a horizontal line, 6 metres long, and he has to paint parts of it red according to a rule he has been given. He selects a point P on the line and measures its distance, x metres from the left hand end.

He then works out the number:

1/(x – 1) + 2/(x – 2) + 3/(x – 3) + 4/(x – 4)

If the number is 5 or more then he paints the point P red, otherwise he leaves it unpainted.

For example when x = 2.1 he gets the number 15.47… , which is more than 5, and so he paints P red. And when x = 1.7 he gets –9.28…, which is less than 5, and so he leaves P unpainted.

Pussicato repeats this for every point of the line, except those with x = 1, 2, 3 or 4, which he has been told to leave unpainted.

When he has finished he finds that four parts of the line are painted red and their total length is a while number of metres. (Pussicato could have worked all that out without doing the painting).

What is the total length of the red parts?


Enigma 493a: Little donkey

From New Scientist #1644, 24th December 1988 [link]

On the faraway Pacific island of Boxingday (not far from Christmas Island), the one letter words A, B, C, …, R, S, T are names of animals. However, an animal can have more than one name, for example, the letters A, B, C, D, E, F, G, H, I, J, K, L, M actually name only 7 different animals. The animal with the most different names is the donkey.

Just before Christmas, Miss Swayingpalms asked each child in her class to write down which animals they wanted to be in their nativity play. In their excitement the children sometimes wrote down the same animal more than once, but using different names. Thus:

Joseph write down A, B, C, D, E which name only 4 animals
Mary wrote down A, G, E, S which name 3 animals
Elizabeth B, E, A, R; 4 animals
John B, I, G; 2 animals
Anna B, I, N; 2 animals
David C, A, T, S; 2 animals

and so on:

D, O, G; 2
D, R, A, G; 2
F, I, B; 2
F, I, T; 2
G, O, A, T; 2
H, A, T; 2
M, I, C, E; 4
N, I, L; 2
N, O, P, Q; 2
Q, R, S, T; 4
R, A, C, E; 3
R, A, T, S; 3
R, I, P, E; 4
R, O, B, E; 4
S, H, A, C, K; 2
S, P, A, R, E; 3
T, A, C, K; 2
T, R, A, I, L, S; 5

Eventually the nativity play was ready. As Miss Swayingpalms brought in the baby Jesus in his manger, she explained to the children that it did not matter about the repeated names, “It’s not what you are called that matters, but what you are!”

How many children did not want a donkey in the Nativity play?

[enigma493a] [enigma493]

Enigma 1018: Half-time

From New Scientist #2174, 20th February 1999

Professor Dolittle shades in those squares corresponding to one of his lectures. He has at least one lecture a day (and on some days he actually has more than one) and no two consecutive days have exactly the same lecture times. On just one day he has no afternoon lectures. Dolittle only seems to work half the week: it is possible to cut the timetable into two pieces of equal area, with one straight cut, so that one half is completely free of shading.

Someone was needed to give an extra lecture at one of two times next week: the one later in the week was also at a later time of day. I asked the professor if he was lecturing at those times. I knew that his answer together with all the above information, would enable me to work out his complete timetable.

In fact, he was free for just the first of those two times and he agreed to take an extra lecture at that time. If I told you the day of that extra lecture you would be able to work out his complete timetable.

Please send in a copy of the professor’s timetable (without the extra lecture added).

In the magazine this puzzle seems to have been labelled: “Enigma 1081“.


Enigma 492: Unlucky 13

From New Scientist #1643, 17th December 1988 [link]

The table below gives some information about the matches played, won, lost, drawn, goals for and goals against by four teams who are eventually going to play each other once. But the table is not complete. If it were, 24 figures would be given, but only 13 have been remembered. I might have known that there would be something unlucky about this and I would have been right, for one of these figures is incorrect. The table looked like this:

Enigma 492

Which figure was wrong? What should it be? Find the correct score in each match.


Enigma 1019: Conversion rates

From New Scientist #2175, 27th February 1999

If Britain doesn’t join the common European currency, the British will have to get used to converting pounds into euros or vice versa.

Maybe pounds will be double the value of euros, maybe even four times the value:

(a) EUROS × 2 = POUNDS
(b) EUROS × 4 = POUNDS

These two multiplications are entirely distinct — any letter may or may not have the same value in one sum as the other. But within each sum each letter represents a different digit, the same letter represents the same digit wherever in the sum it appears, and no number starts with a zero.

Just as the multiplier in (b) is double that in (a), so is the number of solutions — there is just one solution to (a) but there are two to (b).

Please find the six-digit numbers represented by POUNDS in the solution to (a) and in each of the solutions to (b).

A correction was published with Enigma 1023, that: the phrase “any letter may not have the same value” should have read “any letter may or may not have the same value”. I have made the correction in the text above. It think all it’s trying to say is that the two alphametic sums should be treated separately, and don’t necessarily use the same mapping of letters to digits.


Enigma 491: Times check

From New Scientist #1642, 10th December 1988 [link]

Enigma 491

These are, in fact, the same product done by long multiplication in two different ways, with the two multiplicands simply reversed in order. Between them, those two three-figure numbers use six different non-zero digits. And the final answer, which is of course the same for both, has all the digits different and non-zero.

What is the final answer?


Enigma 1020: Slow progress

From New Scientist #2176, 6th March 1999

I have a novelty clock which shows the time digitally from 1:00 to 12:59. The display is green at those times when the individual digits displayed form, in the order shown, an arithmetic progression. The display is red at all other times. So, for example, the display is green at 1:35, 2:10, 3:33 and 12:34.

My nephew has an identical clock, but whereas mine shows the correct time, his is a whole number of minutes (less than an hour) slow.

The display on the two clocks are continuously the same colour as each other for over two hours.

How many minutes slow is my nephew’s clock?


Enigma 490: Uglification practice

From New Scientist #1641, 3rd December 1988 [link]

Alice has met Professor Pip Palindrome — through the looking glass, of course. He never attempts anything which does not involve palindromes, that is, numbers which read the same from left to right as from right to left, for example 2882 or 31413.

They multiply two non-square three-digit palindromes and get an odd five-digit palindrome product, when Pip spots that this is also the product of a four-digit palindrome and a two-digit palindrome.

What was the five-digit product?


Enigma 1021: All at threes and sevens

From New Scientist #2177, 13th March 1999 [link]

For his work in detention, Johnny was set to multiply two large numbers together. One number consisted entirely of threes, the other entirely of sevens:

3333… × 7777… = ???

Surprisingly, he managed to get the correct answer. When he examined his answer he noticed that it contained exactly 7 sevens and 3 threes.

How many digits were there altogether in Johnny’s answer?


Enigma 489: Habitadd

From New Scientist #1640, 26th November 1988 [link]

My word processor has developed a curious habit. As I type out a puzzle from my manuscript, it increases all the numbers I have written, as follows.

It adds 2 to the 3rd number in the puzzle, then it adds 5 to the 6th number in the puzzle, then it adds 8 to the 9th number in the puzzle, and so on.

Recently, I bought 8 apples, 9 oranges and 10 pears and paid 38 pence, whereas my wife bought 13 apples, 13 oranges and 14 pears and paid 51 pence and my daughter bought 16 apples, 18 oranges and 18 pears and paid 54 pence.

The word processor also makes any other necessary changes to the wording so that the puzzle is grammatically correct.

What was the cost of each apple, each orange and each pear?


Enigma 1022: Only

From New Scientist #2178, 20th March 1999 [link]

The six islands of A, B, C, D, E and F are linked by planes of Red Airline and Green Airline. For any pair of islands there are four possibilities for the route between them:

(1) no planes fly on the route;
(2) only red planes fly to and fro on the route;
(3) only green planes fly to and fro on the route; or
(4) both airlines fly their planes to and fro on the route.

We say Island X is linked by Red to Island Y if we can fly from X to Y using only Red planes; similarly for Green. We say X is directly linked by Red to Y if Red planes fly on the route between X and Y; similarly for Green. We say X is indirectly linked by Red to Y if they are linked by Red but not directly linked by Red; similarly for Green.

We have the following information (I):

I1: Island A is linked by Green to only D and E.
I2: Only B and C are linked by Red to D.
I3: Island B is linked only by Red to C.
I4: Island A only links indirectly by Green to D.
I5: Island F is directly linked by Red to only one of the islands.

Question 1: For each of the following four statements, say whether it is true, false or we cannot say whether it is true or false:

(a) Island B is only indirectly linked by Red to D.
(b) Island A is only indirectly linked by Red to E.
(c) There are only two islands that F is not linked to.
(d) If E is linked to F by Red or Green, and it is possible to fly from A to B with only one intermediate stop, then E is only indirectly linked by Red to F.

For the past number of years the airlines have ensured that the pattern of Red and Green flights is never the same in any two years. However, they have allowed only patterns that ensure the statements (I) are true. They now find this is the last year they will be able to carry on this practice.

Question 2: For how many years have the airlines been following this practice?


Enigma 488: Divisor at work

From New Scientist #1639, 19th November 1988 [link]

In the following division sum each letter stands for a different digit:

Enigma 488

Rewrite the sum with the letters replaced by digits.


Enigma 1023: Semi-prime progressions

From New Scientist #2179, 27th March 1999 [link]

Harry and Tom have been investigating sequences of positive integers that form arithmetic progressions where each member of the sequence is the product of two different prime numbers and no members of the sequence have any factors in common. Harry has found the sequence of four such integers whose final (largest) member is the smallest possible for the final member of such a sequence; Tom has found the sequence of five such integers whose final (largest) member is the smallest possible for the final member of such a sequence.

What are the smallest and largest integers in:

(1) Harry’s sequence,
(2) Tom’s sequence.


Enigma 487: It still is one

From New Scientist #1638, 12th November 1988 [link]

I’ve just been sorting out some old papers and I’ve come across the fill set of football results from our local league of four teams for their 1958/59 season. They each played each other once and they used to get two points for a win and one for a draw. I had started to set a puzzle based on those results. I was going to include the partially filled in table below from the end of the season, but with digits replaced by letters (different digits being consistently replaced by different letters). I would then give some additional clues (including the fact that one of the games was won by a margin of five goals) to enable the puzzler to work out all the scores. (The team order is alphabetical, not in order of merit).

Enigma 487

I’ve now decided to see if the same cryptic table is still the basis of an Enigma based on the same set of football results but with three points for a win and one for a draw. It still is one, but I note that had the new point system been in force the 1958/59 champions (who were decided by better goal difference) would in fact only have been runners-up.

Find all six scores (for example, A5 B4; A3 C5; and so on).

I’m sure the name of the third team is meant to be Crumblies, so I’ve changed it. It doesn’t affect the outcome of the puzzle.


%d bloggers like this: