Enigmatic Code

Programming Enigma Puzzles

Puzzle 62: A cross number

From New Scientist #1113, 27th July 1978 [link]


1a. The digits are all even.
4a. Odd, and even when reversed.
5a. 19 is a factor of this.


1d. A perfect square.
2d. A perfect square when reversed.
3d. Each digit is 1 less than the one before.

(There are no 0’s).



Enigma 1090: Week links

From New Scientist #2246, 8th July 2000 [link]

Today we are trying to crack a code. To each of the days:


there is assigned a different whole number from 1 to 10.

We know that, for any pair of days, their numbers have a factor larger than 1 in common if and only if their first three letters have a letter or two in common. So, for example, TUE and WED both have an E and so their numbers will have a factor larger than 1 in common, whereas the numbers for WED and THU will have no factor larger than 1 in common.

We also know that their numbers will satisfy:


What (in order MON to SUN) are their seven numbers?


Enigma 420: A princely sum

From New Scientist #1570, 23rd July 1987 [link]

The King of Zoz was asked by his son for 88,200 ducats to cover the latter’s gambling debts incurred at college.

“That is indeed a princely sum!” said the King, calling for his ornate coffer, the one containing single ducats only.

“How much is there in the old coffer of yours?” asked the Prince as two servants struggled with it it.

The father smiled indulgently but knowingly and replied: “If you were to multiply the number of ducats it now contains by the number of ducats would remain in it were I to remove 88,200 ducats, you would arrive at a perfect square.”

“There must be many numbers of ducats which fit those constraints,” said the son wistfully.

“Aye. And if you have the wit to deduce the number of different numbers of ducats there could be in the coffer consistent with my statement I shall know that you have learnt something and I shall pay your debt. If not, you can cover it yourself.”

Assuming there will be at least one ducat remaining in the coffer if the King removed 88,200 ducats, how many different possible numbers of ducats are there?


Tantalizer 470: Thirsty work

From New Scientist #1021, 7th October 1976 [link]

“My formula for life is Wit multiplied by Will”, Uncle Ernest announced for the umpteenth time. “I daresay you don’t know what that gives you, young Tommy”.

“Oh yes I do, Uncle”, Tommy replied cheekily.

“Success”, snapped Uncle Ernest.

“Thirst”, retorted Tommy.

Tommy, of course, had made a cryptarithmetic problem of it:


Each different letter stands for a different digit.

What is the value of THIRST?


Enigma 1091: One’s best years

From New Scientist #2247, 15th July 2000 [link]

Mr Meaner has now retired from teaching. As a tough arithmetic exercise each year he used to ask his class to take the number of the year and find some multiple of it which consists simply of a string of ones followed by a string of zeros. For example in 1995 one girl in the class found that the 19-digit number 1111111111111111110 was a multiple of 1995!

Mr Meaner had been asking this question every year since he started training as a teacher. On the first occasion it was a reasonably straightforward exercise and most of the class found a multiple using as few digits as possible.

It is lucky that he did not ask the question a year earlier, for that year would have required over two hundred times as many digits as that first occasion did.

In what year did Mr Meaner first ask the question?


Enigma 419: Painting by numbers

From New Scientist #1569, 16th July 1987 [link]


1. You will need four copies of:

Enigma 419 - 1

labelled A, B, C, D.

2. Take A. The artist Pussicato signs the top row and you sign the bottom row; your signature must contain 9 letters.

3. Fill in B by using A as follows. Take each A square in turn, find the position of its letter in the alphabet and from that number subtract the appropriate multiple of 5 to leave a number from 1 to 5. Put that number in the corresponding B square.

4. Fill in C by using B as follows. Each square touches three or five other squares, including touching along a side or at a corner. Take each B square in turn and add up the numbers in the squares it touches. From the total subtract the appropriate multiple of 5 to leave a number from 1 to 5. Put that number in the corresponding C square.

5. Paint D by using C as follows.Number the five colours, Red, Blue, Green, Yellow, White, 1 to 5 in any order you like. Take each C square in turn and find the colour you have given its number. Paint the corresponding D square with that colour.


Enigma 419 - 2

A painter whose name involves only the first five letters of the alphabet produced:

Enigma 419 - 3

What was the painters name?


Puzzle 63: One and one make two

From New Scientist #1114, 3rd August 1978 [link]

“Never tell them more than you need”, as Professor Knowall has so often said. “And pay them the compliment, my dear Sergeant Simple, of supposing that they are capable of putting one and one together to make two”.

As my readers will know, the professor, though he does not often have the time to turn his attention to anything other than crime, is very interested in football and likes making up and solving football puzzles. His remarks about putting one and one together to make two seemed rather silly to me at first, but I soon realised what he meant when he showed me the puzzle.

It was about four football teams, and gave some information concerning the number of matches played, won, lost and so on. But of the 24 pieces of information that one might have expected only 12 were given. One did indeed need to put one and one together to make two.

The information was as follows:

“That ought not to be too hard for you, my dear Sergeant”, he said, “but I must add also the information that not more than seven goals were scored in any match”.

I’m afraid it was too much for me, but I hope that the readers will be able to find out the score in each match.

(Each team is eventually going to play each other once).


Enigma 1092: A prime age

From New Scientist #2248, 22nd July 2000 [link]

Marge, April, May, June, Julia and Augusta have all celebrated their birthday today. They are all teenagers and with the exception of the one pair of twins their ages are all different.

Today, only Marge and April have ages which are prime numbers, but the sum of the ages of all the girls is also a prime number. On their birthday last year, only May and June had ages which were prime numbers, but again the sum of the ages of all the girls was a prime number. On their birthday two years before that, only May and Julia had ages which were prime numbers, but even then, the sum of the ages of all the girls was again a prime number.

How old is Augusta?


Enigma 418: Let us divide

From New Scientist #1568, 9th July 1987 [link]

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

Re-write the sum with the letters replaced by digits.


Tantalizer 471: Hop, skip and jump

From New Scientist #1022, 14th October 1976 [link]

Hop, Skip and Jump live in different houses in Tantalus St., which is numbered from 1 to 100. Here is what they have to say about the matter:

Hop: “My number is divisible by 7. Skip is much too fat. Jump’s number is twice mine.”

Skip: “Hop lives at 28. My number is one third of Jump’s. Jump and I are not both even.”

Jump: “Hop lives at 91. Skip lives at 81. My number is divisible by 4.”

One of them has thus made three true statements, another three false and the remaining fellow has alternated, uttering either true, false, true or false, true, false.

Who lives where? And is Skip much too fat?

A correction to this puzzle was published with Tantalizer 473. The problem statement above has been revised accordingly.


Enigma 1093: Primed to spend

From New Scientist #2249, 29th July 2000 [link]

Bill’s credit card has the usual four four-digit numbers, which are in ascending order of size. All are prime numbers and the sum of the digits of each is the same.

The digits in the first number are all different and the third number is the first number reversed. The digits in the second number are all different and the fourth number is the second number reversed. The last digits of the four numbers are all different.

He has a hopeless memory for figures, but he can always work out his four-digit PIN from his card, because he can remember that it is equal to the difference between the first and third numbers (or the difference between the second and fourth numbers, which is the same) and happens to be a perfect square.

What is the fourth number?


Enigma 417: Snooker triangle

From New Scientist #1567, 2nd July 1987 [link]

We have a small snooker table at home, everything being in a reduced form of the real thing. The point system is the same: that is, 1 for a red, with each potted red enabling the player to try for one of six colours with points from 2 to 7. (For example, the blue is worth 5). At the end of the frame the six colours are potted in turn.

Last Saturday, I played with my daughter and the frame was completed in just one visit to the table by each of us. I opened, potted a red with my first shot, then potted a colour (which, of course, was brought out again) and then, whenever I successfully potted a colour after a red, it was always that same colour. Then I made a mistake (without any penalties) and my daughter took over. She, too, always followed a red by a particular colour, but a different one from mine. She cleared the table and we drew on points: we decided to replay the next day.

Surprisingly, all that I said about Saturday’s frame could be said about Sunday’s, but this time we drew with one more point each than on the previous day.

How many times, in total for the two frames, did I pot the blue?

How many balls does my small table have?


Puzzle 64: Addition: digits all wrong

From New Scientist #1115, 10th August 1978 [link]

Each digit in the addition sum below is wrong. But the same wrong digit stands for the same correct digit wherever it appears, and the same correct digit is always represented by the same wrong digit.

Find the correct addition sum.


Enigma 1094: De-fence

From New Scientist #2250, 5th August 2000 [link]

In my garden there is a circular pond less than two metres across. Because my young nephew was coming to stay I asked a local handyman to erect a fence around it. He did this by taking three straight lengths of fencing, two of them equal, and each of them a whole number of metres long. He formed these into a triangle which fitted around the pond.

I complained that this took up too much space, so he adapted the construction to make a hexagonal fence around the pond. Opposite sides of the hexagon were parallel, three of the sides used bits of the original triangular fence without moving them, and all six sides touched the edge of the pond. The total perimeter of the new hexagonal fence was precisely half of that of the original triangular fence.

What were the lengths of the three original straight pieces of fencing?


Enigma 416: Short notice

From New Scientist #1566, 25th June 1987 [link]

I am making a noticeboard from a sheet of cork. In my search for some wood to back it, I came across two pieces having the same area as the cork, but different dimensions. To make the first piece fit, it would have been necessary to cut A feet off the cork and B feet off the wood, and to fit the second would have required C feet to be cut off the cork and D feet off the wood.

When I arrived at the timber yard I had forgotten the dimensions of my piece of cork. I remember only that, in measuring A, B, C and D, I obtained 1 foot, 2 feet and 4 feet only, with one measurement occurring twice. Which one occurred twice and in what order I obtained these measurements I forget.

All I can remember is that the cork measured a whole number of inches along each side and that none of its sides measured a whole number of feet.

Can you help me to deduce the size of wood I need to buy before the woodyard closes?

(Answers in inches, please: 1 foot = 12 inches).


Tantalizer 472: Regular soldiers

From New Scientist #1023, 21st October 1976 [link]

The republic of Popularia has the largest police force and the longest pedestrator in the world. The latter is a moving pavement which rolls at uniform speed in both directions between the Palace of Justice and the Ministry of Fun. Rolling along with it are armed guards, standing stiffly at attention and posted at regular intervals.

If you too stood at attention on the pedestrator and timed one minute, starting and ending half way between two guards coming the other way, you would be surprised how many guards rolled past you during the minute. Or perhaps you would not. Anyway the number would be eight times the speed of the pedestrator in miles per hour.

You probably long to know the speed of the device. But that is a state secret. So you will have to be content to discover how far apart the guards are posted.

This issue of New Scientist also contains an article of the computer assisted proof of The Four Colour Theorem.


Enigma 1096: Prime break

From New Scientist #2252, 19th August 2000 [link]

At snooker a player scores 1 point for potting one of the 15 red balls, but scores better for potting any of the 6 coloured balls: 2 points for yellow, 3 for green, 4 for brown, 5 for blue, 6 for pink, 7 for black.

Davies potted his first red ball, followed by his first coloured ball, then his second red ball followed by his second coloured ball, and so on until he had potted all 15 red balls, each followed by a coloured ball. Since the coloured balls are at this stage always put back on the table after being potted, it is possible to pot the same coloured ball repeatedly.

Davies’ break was interesting as after he had potted each of the 15 coloured balls his cumulative score called by the referee was always a prime number.

After potting the 15 red balls and 15 coloured balls, a player’s final task is to attempt to pot (in this order) yellow, green, brown, blue, pink and black. I won’t tell you how many of those Davies managed to pot, nor could you be sure how many of them he potted even if I told you his total score for the break.

What was that total score?


Enigma 415: Buses galore

From New Scientist #1565, 18th June 1987 [link]

The Service Bus Company runs buses on the route shown by the map:

Enigma 415

Each bus starts its journey at the Terminus, T, and goes towards A. At each crossroads it goes straight across. The bus eventually enters T from B and leaves for C. It finally arrives at T from D, to complete its journey. The time to go from one crossroads to the next is three minutes and so it takes one hour to complete the journey.

Buses are timetabled to leave T on the hour and at various multiples of three minutes after the hour. When a bus completes a journey it immediately begins its next journey and so the timetable repeats each hour.

This means each bus reaches a crossroads at times 00, 03, 06, 09, …, 54, 57. The buses are timetabled so that no two buses ever reach the same crossroads at the same time. Also the buses are timetabled so that the maximum number of buses are running on the route.

How many buses are running on the route?


Puzzle 65: Division: figures all wrong

From New Scientist #1116, 17th August 1978 [link]

In the following, obviously incorrect, division sum the pattern is correct, but every single figure is wrong.

The correct division, of course, comes out exactly. All the digits in the answer are only 1 out, but all the other digits may be incorrect by any amount.

Find the correct figures.


Enigma 1097: Chessboard triangles

From New Scientist #2253, 26th August 2000 [link]

Take a square sheet of paper of side 1 kilometre and divide it into small squares of side 1 centimetre. Colour the small squares so as to give a chessboard pattern of black and white squares.

When we refer to a triangle, we mean a triangle OAB, where O is the bottom left corner of the square of paper, A is on the bottom edge of the paper and B is on the left hand edge of the paper.

Whenever we draw a triangle then we can measure how much of its area is black and how much is white. The score of our triangle is the difference between the black and white areas, in square centimetres. For example if OA = 3 cm and OB = 2 cm then we find the score of the triangle is 1/6 cm².

Question 1. What is the score of the triangle with OA = 87,654 cm and OB = 45,678 cm?

Question 2. What is the score of the triangle with OA = 97,531 cm and OB = 13,579 cm?

Question 3. Is it possible to draw a triangle on the paper with a score greater than 16,666 cm²?