Enigmatic Code

Programming Enigma Puzzles

Tag Archives: by: Colin Singleton

Enigma 1031: Security

From New Scientist #2187, 22nd May 1999

George’s new office has a security lock in which you have to key in a series of digits — all different — before you can open the door. Unfortunately, George is having difficulty committing this security number to memory.

So far, he has memorised a number comprising a selection of different digits from the security number. He has made a note of the memorised number on the memo sheet on which he was given the security number.

After studying the sequence yet again, he absent-mindedly left the memo lying around his house. When his wife found the piece of paper bearing just two numbers, she thought George has been trying to devise an “Alphametic” Enigma for New Scientist. Just for fun, she multiplied the numbers together and found that the product was a seven-digit number in which all the digits are the same.

What is George’s office security number?

[enigma1031]

Enigma 1036: Multiple shifts

From New Scientist #2192, 26th June 1999 [link]

George’s young son has been playing with numbered cards and has discovered an interesting curiosity. Having placed six cards on the table to show the number 179487, he then moved the right-hand card to the left to form the number 717948. A quick check on his calculator confirmed that this number is exactly four times the first number.

George congratulated his son on this discovery, and then challenged him to find the smallest number which can be multiplied by four simply by moving the last digit to the front.

Can you find this number — and the smallest number that can be multiplied by five in similar fashion?

[enigma1036]

Enigma 1039: Mirror, mirror

From New Scientist #2195, 17th July 1999 [link]

George has fitted two mirrors inside a rectangular box, the first on one of the long sides, and the other across a diagonal. He shines a narrow beam of light through a small hole which he has drilled through the side of the box and the mirror on that side. It enters perpendicular to the side of the box, is reflected five times by the mirrors and emerges perpendicular to the end of the box through another hole, as shown.

The box is exactly one metre long. You can calculate the width if you wish, but that is not George’s problem. He wants to know how far the beam travels while it is inside the box.

Can you help him?

[enigma1039]

Enigma 1041: Lucky sixes

From New Scientist #2197, 31st July 1999 [link]

George’s lucky number is six. After extensive number-crunching he has discovered that exactly half of all the numbers from 1 to his telephone number (inclusive) contain at least one six and that his telephone number is unique in possessing this property. George has done the hard work — all you have to do is deduce his telephone number, which has fewer than eight digits.

[enigma1041]

Enigma 1043: Grandad

From New Scientist #2199, 14th August 1999 [link]

My late grandfather was born on a fine summer Sunday, several decades ago. His sixth, twelfth and eighteenth birthdays were also on Sundays, as was his birthday in 1994.

How old would Grandad have been on his birthday in 1999 if he had survived?

[enigma1043]

Enigma 1047: Friday the 13th

From New Scientist #2203, 11th September 1999 [link]

Someone has told George that the 13th of a month is more likely to be a Friday than any other day of the week, but he is not sure whether he should believe it.

This year, 1999, the date Friday the 13th occurs only once, in August. Last year, 1998, it occurred three times, in February, March and November. It is clearly somewhat irregular.

If George choose a random month in a random year on the Gregorian calendar, what is the probability that it will include Friday the 13th? Please give your answer as a fraction in its lowest terms.

[enigma1047]

Enigma 1053: Home truths

From New Scientist #2209, 23rd October 1999 [link]

George was being very secretive about his new house number — I had only established that it has two digits. After I had bought him a pint or two, he agreed that I could ask some questions, to each of which he would answer simply yes or no. I asked the following:

1. Is your house number the sum of two different non-zero perfect squares?

2. Is it the sum of two different prime numbers?

3. Is the sum of its digits even?

4. Is your number greater than 70?

George dutifully answered my questions, and I was crestfallen. “I cannot deduce your number”, I admitted, “but if you allow me one more question I can be certain of doing so”.

George reluctantly answered my fifth question, whereupon I boldly declared his house number — only to be rebuffed again.

“Wrong”, he said — but then sheepishly admitted that, in his slightly inebriated state, he had given the wrong answer to just one of my questions. When he told me which one, I jubilantly realised that I should not have needed a fifth question to identify his number.

What is George’s new house number?

[enigma1053]

Enigma 1064: Low score draw

From New Scientist #2220, 8th January 2000 [link]

You play this game by first drawing 20 boxes in a continuous row. You then draw a star in each box in turn, in any order. Each time you draw a star you earn a score equal to the number of stars in the unbroken row [of stars] that includes the one you have just drawn.

Imagine that you have already drawn eleven stars as shown below, and you are deciding where to place the twelfth.

Drawing the next star in box 1 would score only 1 point, in box 11 it would score 2 points. A star in box 2, 5 or 6 would score 3 points, and in box 9, 12 or 19 it would score 4 points. Drawing the star in box 16 would score 6 points.

Your objective is to amass the lowest possible total for the 20 scores earned by drawing the 20 stars.

What is that minimum total?

This puzzle completes the archive of Enigma puzzles from 2000. There are now 1169 Enigma puzzles available on the site. There is a complete archive from the beginning of 2000 until the end of Enigma in December 2013 (14 years), and also from the start of Enigma in February 1979 up to January 1988 (10 years), making 24 years worth of puzzles in total. There are 623 Enigma puzzles remaining to post (from February 1988 to December 1999 – just under 11 years worth), so I’m about 62% of the way through the entire collection.

[enigma1064]

Enigma 1076: Last posts

From New Scientist #2232, 1st April 2000 [link]

George has a small field adjacent to his new house, in which he intends to build an ornamental lake. The field is triangular with sides conveniently 4, 7 and 8 times the length — about 12 feet — of the job lot of fence rails he has bought from the local builders’ merchant. He has set the required 19 posts evenly spaced around the perimeter and built the fence.

To define the lake, George has stretched three lengths of rope, each from one corner post to the last post before the corner (working anticlockwise) on the opposite side of the field. The enclosed triangle will be the lake, the surrounding area grassland. The whole field measures two “ares” — an “are” being a metric unit of area equal to 100 square metres.

What is the area of the lake?

[enigma1076]

Enigma 1087: Egyptian triangles

From New Scientist #2243, 17th June 2000 [link]

George has made a number of spinners for his children to select numbers when playing board games. Each has a circular disc divided into a number of equal sectors. He has made several discs of various sizes and with various numbers of sectors.

George’s son has discovered that three of the discs will fit together so that the marked radii form a triangle (shaded in the diagram) which includes just one sector on each disc.

Further research revealed that several other sets of three discs of suitable sizes and numbers of sectors can be used for form triangles of various shapes in this way, always including just one sector on each disc. George has found one set in which two of the discs have different prime numbers of sectors.

How many sectors are marked on the third disc of this trio?

[enigma1087]

Enigma 1102: The Apathy Party

From New Scientist #2258, 30th September 2000 [link]

George called a meeting to inaugurate the National Apathy Party, open to anyone who has never voted in a General Election. He hopes to be the next Prime Minister. The turnout was phenomenal, but he managed to seat them all in Wembley Stadium (capacity 80,000). George proposed that the President and the Committee should be chosen by chance, rather than by ballot. The delegates had been allocated sequential membership numbers of arrival — George, of course, being No. 1. He proposed that one number be chosen at random by the computer — that member would be the President. All members whose numbers divide exactly into the President’s number would be on the Committee. Apathy reigned — this totally undemocratic procedure was agreed.

The computer produced an odd membership number for the President and the number of committee members, including George and the President, was an odd square greater than 10.

What was the President’s membership number?

[enigma1102]

Enigma 1108: Every vote counts

From New Scientist #2264, 11th November 2000 [link]

George was nominated for president of the Golf Club. There was only one other candidate, and the president was elected by a simple ballot of the 350 members, not all of whom in fact voted.

The ballot papers were taken from the ballot box one at a time and placed in two piles — one for each candidate — with tellers keeping a count on each pile.

George won (what did you expect?), and furthermore his vote was ahead of his opponent’s throughout the counting procedure.

“That must be a one-in-a-million chance,” said the demoralised loser.

“No,” said George. “Now that we know the number of votes we each received, we can deduce that the chance of my leading throughout the count was exactly one in a hundred.”

How many members did not vote?

[enigma1108]

Enigma 1112: Patio zones

From New Scientist #2268, 9th December 2000 [link]

George is building a patio, which will be covered using one-foot-square concrete slabs of seven different colours. He has divided the rectangular patio into seven rectangular zones, without any gaps.

Each zone will be covered by slabs of one colour, with five different colours appearing around the perimeter of the patio, and four different colours at the corners. The seven rectangular zones are all different shapes, but all have the same perimeter, which is less than 60 feet.

What are the dimensions of the patio that George is building?

This puzzle is referenced by Enigma 1221.

[enigma1112]

Enigma 1118: 2001 – A specious oddity

From New Scientist #2274, 20th January 2001 [link]

George is planning to celebrate the new millennium — the real one — by visiting Foula, the most remote of the Shetland Islands. It is one of the few places in the world where the inhabitants still live by the old Julian calendar rather than the now almost universal Gregorian calendar.

In order to correct the drift of the Julian calendar against the seasons, Pope Gregory decreed that in 1582, Thursday 4th October (Julian) should be immediately followed by Friday 15th October (Gregorian), and in order to prevent a recurrence of the drift, years divisible by 100 would henceforth only be leap years if divisible by 400. Previously all years divisible by four were leap years. Catholic countries obeyed immediately, others — apart from Foula — fell into line in later centuries.

While planning his visit George programmed his computer to print 12-month calendars for the required year, showing weekdays, under both Julian and Gregorian styles. But when he ran the program he was surprised to find that the two printouts were identical.

He then realised that he had entered the wrong year number — the Julian and Gregorian calendars for the year 2001 are not the same.

What is the first year after 1582 for which they are the same?

[enigma1118]

Enigma 1122: Chapter and worse

From New Scientist #2278, 17th February 2001 [link]

While waiting for a much-delayed train, George found himself trying to read a very boring book. He soon gave up and started counting its pages instead. Chapter 1 started on Page 1, and each subsequent chapter started at the top of a page. The boredom factor was enhanced by the fact that the length in pages of each chapter was equal to the chapter number multiplied by the length of Chapter 1.

With still no sign of the train, George proceeded to total all the page numbers in each chapter. Again, the totals for each chapter were exact multiples of the total for Chapter 1, but this time the multiples did not equate to chapter numbers. For the last chapter the multiple was a prime number, even though the chapter number was not.

How many pages were there in the book?

[enigma1122]

Enigma 1126: Enigmatic dice

From New Scientist #2282, 17th March 2001 [link]

George has been winning free drinks at his local pub using a trick with four non-standard dice. Each face of each die is marked with one of the numbers 1 to 9, not necessarily all different. One of the nine numbers does not appear on any die, but each die has the same total of its six faces.

George allows you to choose one die, then he chooses one of the others. The two selected die are thrown simultaneously, and the one who throws the smaller number buys the drinks. Draws are impossible.

His friends have discovered that if they choose the red die, George chooses the yellow — if they choose yellow, George chooses green — if they choose green, George chooses blue — and if they choose blue, George chooses red! George expects (statistically) to win exactly two throws in every three with any of these pairs of dice.

We can conveniently represent the markings on a die as a six-digit number, with the digits in ascending order. You can check that 334455 beats 222288 two-to-one, but George’s set does not include either of these dice. The red die includes at least one lucky seven. There is only one set of four dice which will do the trick.

List the six numbers for each of the four colours.

[enigma1126]

Enigma 1132: Phone back

From New Scientist #2288, 28th April 2001 [link]

The PIN code on George’s cash card is a semi-prime number, that is to say it is the product of two different prime numbers. He discovered some time ago that the PIN code multiplied by his car registration number gives his six-digit phone number, which does not begin with a zero. But George has now discovered a slightly more obscure coincidence. If he subtracts his house number from his phone number and multiplies the result by his house number, the result is his phone number with its digits in reverse order!

What is George’s car registration number?

[enigma1132]

Enigma 1135: Perfect harmony

From New Scientist #2291, 19th May 2001 [link]

The Ancient Greeks studied “harmonic triads” of integers, the simplest of which is {2, 3, 6}. The middle number is known as the “harmonic mean” of the other two and is calculated so that its reciprocal is the mean (“average”) of the reciprocals of the other two numbers. George has constructed a “harmonic square” — nine different integers in a 3 × 3 grid such that in each of the three rows, the three columns and the two diagonals, the three numbers form a harmonic triad with the harmonic mean in the middle.

Using his computer, George has discovered that the smallest number which can appear in such a square is 210. You should need only progressive intuition to deduce the other eight numbers which accompany 210 in a harmonic square.

What is the largest of these numbers?

[enigma1135]

Enigma 1140: A long, long road

From New Scientist #2296, 23rd June 2001 [link]

George lives in a long road in which the houses are numbered from one with no numbers missing. He has calculated that the total of all the house numbers less than his is equal to the total of all the house numbers greater than his.

George’s brothers, Dave, Ernest and Fred, live in shorter roads than George, but they can each make the same claim regarding house numbers. The brothers’ four house numbers have different numbers of digits.

Hearing this story, George’s drinking friend scribbled on a beer mat for a while, then he asked: “George, does your road have nearly 10,000 houses?”

“No, not nearly that many,” George replied.

How many houses are there in total in the four roads? And what answer would the man in the pub have given to that question before being corrected?

[enigma1140]

Enigma 1146: Units fore and aft

From New Scientist #2302, 4th August 2001 [link]

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?

[enigma1146]