Enigmatic Code

Programming Enigma Puzzles

Enigma 1144: Isaac Newton (?-1727)

From New Scientist #2300, 21st July 2001

Enigma 1144

Isaac Newton, 1642-1727? or 1643-1727? The discrepancy of course is due to the overlap of the Julian and Gregorian calendars and to avoid any controversy I have omitted his birth year altogether in the given multiplications, leaving only 1727 as shown. All other digits have been replaced by letters and asterisks.

However, the mechanistic laws of motion attributed to this great scientists provide another clue and this is given by the simple equation: F = m × A.

In the multiplications and the clue, different capital letters stand for different digits and the same capital letter stands for the same digit. Asterisks and the lower-case letter, m, can be any digit.

What is the value of SCIENTIST?


Enigma 367: Spilt ink

From New Scientist #1516, 10th July 1986 [link]

Uncle Bungle has been making up another long division sum with letters substituted for digits, and those who know him well — as I do — will not be surprised to hear that all was not as it should be. Being rather old-fashioned he still uses ink, and being rather careless he has spilt it so that some of the letters were, I’m afraid, quite illegible. What can be read can be seen below, and I am glad to say that what is left is as it should be; that is, each letter stands for a different digit:

Enigma 367

Rewrite the complete sum with letters and blanks replaced by digits.


Enigma 1145: More or less

From New Scientist #2301, 28th July 2001

With the usual letters-for-digits understanding, here are two recurring decimals in word form:


One is a multiple of the other and one when written as a fraction in its simplest form, has a denominator of less than a thousand.

What is that simplest fraction?


Enigma 366: On the scent

From New Scientist #1515, 3rd July 1986 [link]

In this puzzle you scientists are on the scent for some facts and, as is often the case, different digits have been consistently replaced by different letters.

SCENT is a factor of SCIENTIST


(and, in fact, F also goes into SCENT, namely S thousand more times than it goes into SENT.)

What’s the SENSE?


Enigma 1146: Units fore and aft

From New Scientist #2302, 4th August 2001

Reading an old question paper in Mathematical Challenge, a problem-solving competition in Scotland, George found the question:

“Which integer can be multiplied by 99 by appending a single digit 1 at each end?”

While struggling with this question, he discovered that 77 can be multiplied by 23 by adding 1 in front and 1 behind:

77 × 23 = 1771.

With rather more effort he found:

52631579 × 29 = 1526315791.

The answer to the Scottish challenge is: 112359550561797752809.

George eventually proved that 23 and 29 are the smallest prime numbers by which other suitably chosen numbers can be multiplied simply by adding ones fore and aft.

What is the largest prime number by which some other number can be multiplied using this trick?


Enigma 365: Men of letters

From New Scientist #1514, 26th June 1986 [link]

Six Professors, A, B, C, D, E and F, are the guest speakers at a philosophy conference at St Gadarene’s. So that they should not be confused with the audience they are given labels A, B, C, D, E and F by the organisers. Unfortunately, none of them ended up with the right label. On the way up to the podium, Professor A asks the man wearing the letter B: “Are you Professor C?”

“No. Why do you ask? You’re not wearing C. But Professor C ought to swap labels with Professor F, for then one of them would have the right label. And in case you were wondering, I’m not D either.”

“I’ve never seen such disarray. It would be quite impossible to choose a single pair from the six of us in such a way that one of the two might truthfully say to the other: ‘We two have each other’s labels’.”

“Well, it could be worse. At least the company can be divided into two groups, each of which would sport the same letters as the professors it contains. What’s more, each group would have a label with a vowel on it. Now please leave me alone, I’m a solipsist.”

By this time the applause had died down and it was decided that the professors should present their papers in the alphabetical order of the labels they each wore.

I wasn’t too happy with the paper about utilitarianism. I enjoyed “Why pragmatism doesn’t work”. But most of all I enjoyed deducing the names of the professors from their labels.

Can you list the names of the six professors in the order in which they presented their papers?


Enigma 1147: Multiply and add

From New Scientist #2303, 11th August 2001

Matthew is practising his multiplication and addition. He had a board (as below) and nine cards labelled 1,2,3,…,8,9.

Enigma 1147

He shuffles the cards and deals them on to the board, one to each square. For each square, he multiplies the number on the board by the number on the card in that square. Finally he adds together the nine products he has obtained to give his final number.

When I watched Matthew play the game his final number was 545. When he had finished he then moved some of the cards. Each card he moved went one square horizontally or vertically, but not diagonally, to another square on the board. I can’t remember all the cards he moved, but I do know he moved the cards in the four corner squares. He then had a new layout with one card in each square and he repeated his multiply and add routine. When he told me his final number, I asked him how many factors it had. After a while he told me he had found 20 but had still not finished his search.

What was Matthew’s final number after he had moved the cards?


Enigma 364: Wrong-angled triangle

From New Scientist #1513, 19th June 1986 [link]

“We Yorkshireman,” said my friend Triptolemus, “like a puzzle as a cure for insomnia, instead of counting sheep. Have you got a nice simple question, without a mass of figures to remember?”

So I said, “If a wrong-angled triangle has whole-number sides and an area equal to its perimeter, how long are its sides?”

He slept on the the problem and gave me the answer next morning.

Can you?

(A wrong-angled triangle is of course the opposite of a right-angled triangle. Instead of two of its angles adding up to 90°, it has two angles differing by 90°).

There are now 1000 Enigma puzzles on the site, with a full archive of puzzles from Enigma 1 (February 1979) up to this puzzle, Enigma 364 (June 1986) and also all puzzles from Enigma 1148 (August 2001) up to the final puzzle Enigma 1780 (December 2013). Altogether that is about 56% of all the Enigma puzzles ever published.

I have been able to get hold of most of the remaining puzzles up to the end of 1989 and from 2000 onwards, so I’m missing sources for most of the puzzles originally published in from 1990 to 1999. Any help in sourcing these is appreciated.


Enigma 1148: Four-way fairway tie

From New Scientist #2304, 18th August 2001

After they had each played four rounds in the golf tournament Bernhard, Colin, Darren and Ernie all ended up with the same total score even though the scores for the 16 individual rounds that they played were all different. Each player’s score for each round was in the 60s or 70s (that is to say between 60 and 79 inclusive). Bernhard’s score in each of his four rounds was a prime number, Colin’s score in each of his four rounds was a semi-prime (the product of two prime numbers), Darren’s and Ernie’s scores in each of their four rounds were numbers that are neither prime nor semi-prime. Darren’s best (lowest) round was better than Ernie’s best round, and Darren’s worst round was better than Ernie’s worst round.

List in ascending order Ernie’s scores for the four rounds.


Enigma 363: Incomplete statistics

From New Scientist #1512, 12th June 1986 [link]

Six football teams — A, B, C, D, E and F — are to play each other once. After some of the matches have been played a table giving some details of the matches played, won, lost, etc., looked like this:

Enigma 363

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

Find the score in each match.

This is the 1000th puzzle posted to the site in the enigma category. However, since there are a couple of duplicate puzzles (Enigma 83 duplicates Enigma 9, and Enigma 1770 duplicates Enigma 1757) I’m holding off claiming we’ve got to 1000 Enigma Puzzles until next week (and it also means I don’t have to celebrate the 1000th puzzle by posting a football problem).


Enigma 1149: Egyptian fraction

From New Scientist #2305, 25th August 2001

The Ancient Egyptians could not comprehend fractions with numerators greater than 1, such as 8/11. If required to divide 8 sacks of wheat evenly among 11 bakers, each could first be given 1/2 a sack, then from the residue each could be given 1/5 of a sack, but not as much as 1/4. With modern arithmetic we can use this logic to calculate that 8/11 = 1/2 + 1/5 + 1/37 + 1/4070.

There are several ways of representing 8/11 as the sum of reciprocals without including such unfriendly fractions as 1/4070. George’s friend Henry has discovered that 8/11 = 1/2 + 1/6 + 1/22 + 1/66, which he likes because the reciprocal denominators are all even divisors of his house number, 66. George has matched this achievement by expressing 8/11 as the sum of the reciprocals of a set of different odd divisors of his odd house number, which is less than 200.

What is George’s house number?


Enigma 362: On the face of it

From New Scientist #1511, 5th June 1986 [link]

I have a cube and on each face there is a different digit (written in modern digital style, so that, for example, a 2 would look the same either way up). My viewpoint from the front stays the same in all that follows; it is the cube which moves. By a “top twist” I mean that the front face in view moves to the top, by a “right twist” that the front face in view moves to the right, etc., each time bringing a new face into view.

I start by looking at the face in view. Bottom twist, look again, bottom twist, look again, bottom twist, look again. In all I have read off, quite correctly placed, a four-figure perfect square.

Left twist and ready to start again. Look at the face in view, left twist, look again, top twist, look again, top twist, right twist, look again. I have now read off, quite correctly placed, another four-figure perfect square.

Now for a fresh start. I look at a face, left twist, look again, left twist, look again, left twist, look again. I have read off, quite correctly placed, a four-figure number which is exactly twice a perfect square.

Top twist, top twist and ready to start again. Look at the face in view, left twist, look again, left twist, look again, left twist, look again. This time I have read off, quite correctly placed, a four-figure number which is not a perfect square.

What is that last number?


Enigma 1150: Cubic meter

From New Scientist #2306, 1st September 2001 [link]

My car has a five-figure display for the milometer, showing the total miles travelled since the car was made, and a three-figure display for an odometer (which can be set to zero at the beginning of a trip) to measure the distance of a journey. When I got the car both meters were showing perfect cubes with no zeros. I also noticed that both notched up the next mile simultaneously.

I never reset the odometer, it just keeps going round and round, going back to zero when it reaches one thousand. Once when it was at zero the milometer was again showing a perfect cube. (In fact it was the second occasion since I bought the car that the odometer had been at zero, but you don’t need to know that). I have run the car for several years since then (although the milometer has never gone back to zero yet).

As I parked this morning I noticed that again both meters were displaying perfect cubes with no zeros.

What were the two meters displaying this morning?


Enigma 361: How many furlongs to the mile?

From New Scientist #1510, 29th May 1986 [link]

“How can one inch, one foot, one yard, one furlong and one mile be only 249 inches?” asked Albert, who was looking at a calculation in the Tarizania University library.

“Simple,” replied the librarian. “That sum was done before we adopted the English system of metrication.”

“How many furlongs to the mile were there?”

“Perhaps you would like to work out that prime number if I tell you that there were more furlongs to the mile than yards to the furlong, more yards to the furlong than feet to the yard and more feet to the yard than inches to the foot,” said the librarian.

What is the answer to Albert’s question?


Enigma 1151: Workers’ bonus

From New Scientist #2307, 8th September 2001 [link]

Each of the workers of the Manufacturing Company joined the company on 30 June in some year before 1996. The company’s profits for each year ending 30 June are always the same, £P, where P is a whole number between 2000 and 2500. On the 30 June each year, each worker, W, receives a bonus of P × (A/B) pounds, rounded, if necessary, to the nearest pound, with 50p going up; where A = the number of years W has worked for the company, and B = the sum of the numbers of years worked for the company by all the workers. Worker Frances found that in each of the years 1996, 1997 and 1998 her figure P × (A/B) was a whole number and she received bonuses of £315, £336 and £350, respectively.

Question 1. What is P?

Frances joined the company at least one year later than every other worker. Suppose that all the workers live for 1000 years and over that 1000 years the company’s annual profits remain at £P and no worker joins or leaves the company.

Question 2. What is the first year when all the workers will receive the same bonus?


Enigma 360: For the time boing

From New Scientist #1509, 22nd May 1986 [link]

“This is my favourite clock,” said Mr Fescu, the Curator of the House of Clocks. “It has a curious mechanism which prevents it from stopping or being started except exactly on the hour. It only chimes on the hour and normally emits a number of bongs equal to the hour it is striking. But if it stops and is restarted at a later hour less than 12 hours on it emits all the chimes it missed between the stopping and starting times, not counting those of the hour at which it is restarted.”

“You mean if it stops at 9:00 and is restarted at 8:00 it emits 70 bongs?”

“Precisely,” said my guide, clutching and enormous key. “And what is more interesting is that certain numbers of bongs are special, in that they occur between one unique pair of stopping and starting times only. If you heard 70 bongs it could only signify that the clock stopped at 9:00 and was restarted at 8:00. Given the time at which the clock has stopped this time, there is only one hour at which I could rewind it to yield a magic number of bongs, and Lo!” he said, hopping from foot to foot and gesticulating at the church clock just visible in the distance, “that hour is arrived.”

So saying he moved the hands to the right time, wound the mechanism up and kicked it, whereupon it emitted an uneven number of bongs and a prime number at that.

What was the time; when had the clock stopped; how many bongs did the clock emit?


Enigma 1152: Tet on the Nile

From New Scientist #2308, 15th September 2001 [link]

Pharaoah Tetrakamun was bored with the rectangular [based] pyramids at Gizah so he commanded his architect to design him a tetrahedral monument. The six edges (all different) were to measure cubes of successive integers, in cubits. The face with the largest perimeter was to form the base. Eventually the architect found the lowest possible set of six successive cubes.

In ascending order, what were the lengths of the three sides of the base?


Enigma 359: Neat odd quad

From New Scientist #1508, 15th May 1986 [link]

Enigma 359

I call ABCD an odd cyclic quadrilateral, or “odd quad” for short. It has four corners A, B, C, D, and four straight sides AB, BC, CD, DA, so it’s a quadrilateral. The corners lie on a circle, so it’s cyclic. And it’s odd because — well, what is its area? I have decided to define that as what the sides cut off from the outside world, that is, the sum of the shaded areas.

neat odd quad has the lengths of its four sides all different positive whole numbers and its area is a whole number too.

Can you find a neat odd quad with an area less than 30? What are the lengths of:

(a) The sides AB, CD, which don’t cross?
(b) The crossing sides BC, AD?


Enigma 1153: Luconacci numbers

From New Scientist #2309, 22nd September 2001 [link]

In the Fibonacci sequence the first two terms are 1 and 1, and each subsequent term is the sum of the previous two terms; so the sequence starts 1, 1, 2, 3, 5. Less well known is the Lucas sequence, whose first two terms are 1 and 3, and each subsequent term is the sum of the previous two terms; so the sequence starts 1, 3, 4, 7, 11. In the Tribonacci sequence (so named by Mark Feinberg) the first three terms are 1, 1 and 2, as in the Fibonacci sequence, and each subsequent term is the sum of the previous three terms; so it starts 1, 1, 2, 4, 7.

Harry, Tom and I were looking to find a 2-digit Fibonacci number, a 2-digit Lucas number and a 2-digit Tribonacci number that used six different digits. We each found a different solution; our three Fibonacci numbers were all different from each other; our three Lucas numbers were all different from each other; and our three Tribonacci numbers were all different from each other. None of the numbers in my solution appeared in either Harry’s or Tom’s solution.

List in ascending order the numbers in my solution.


Enigma 358: Add up the scores

From New Scientist #1507, 8th May 1986 [link]

In the following football table and addition sum letters have been substituted for digits (from 0 to 9). The same letter stands for the same digit wherever it occurs and different letters stand the different digits.

The four teams are eventually going to play each other once – or perhaps they have already done so. The score in each match is different.

Enigma 358 - Table

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

Enigma 358 - SUM

Find the scores in the football matches and write the addition sum out with numbers substituted for letters.