Enigmatic Code

Programming Enigma Puzzles

Tag Archives: by: Richard England

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).

[enigma1016]

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.

[enigma1019]

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.

[enigma1023]

Enigma 1027: Five-digit cubes

From New Scientist #2183, 24th April 1999 [link]

Harry, Tom and I were asked by Mary each to select a five-digit perfect cube that consisted of five different digits and to tell her (in secret) which one had been selected. After we had each done so she said:

“If I now told any one of you individually how many digits his cube has in common with each of the other two cubes he could deduce with certainty one, but not both of them”.

That in itself was enough information to enable me to deduce with certainty both the cubes that Harry and Tom had between them selected.

What were those two cubes?

In the magazine this puzzle was published as Enigma 1026 (despite that number having been used the previous week).

[enigma1027]

Enigma 1030: Uncommonly different progressions

From New Scientist #2186, 15th May 1999 [link]

Certain 5-digit perfect squares can be formed by coupling a pair of smaller squares: a 1-digit square followed by a 4-digit square, or a 2-digit square followed by a 3-digit square, or a 4-digit square followed by a 1-digit square. A leading zero in front of the second square makes it ineligible; that means that 64009 can only be regarded as 80² followed by 3² (not at 8² followed by 3²) and squares such as 10000 are eliminated — so don’t waste time looking for a 3-digit square followed by a 2-digit square; it should be obvious that no such 5-digit square can exist.

Harry, Tom and I each chose three eligible 5-digit squares, and on each of our squares we multiplied the square roots of the pair of coupled smaller squares. We each found that our three products could be arranged to form an arithmetic progression; in addition the common difference of our three progressions could themselves be arranged to form another arithmetic progression whose common difference was different from that of any of the three previous progressions.

1. List in ascending order those 5-digit squares that were chosen by just one of us.
2. List in ascending order those eligible 5-digit squares that none of us chose.

[enigma1030]

Enigma 1034: Double-digit squares

From New Scientist #2190, 12th June 1999 [link]

Four of us were trying to find a one-digit perfect square, a two-digit perfect square, a three-digit perfect square and a four-digit perfect square, such that five different digits were each used twice to form them. To make matters harder for ourselves we agreed that one of those five digits must be 7. Since we remembered that both 0 and 1 are perfect square we were each able to chose a different one-digit square.

We each found a valid solution, and our solutions had no squares in common.

List in ascending order the other squares in the solution that had 9 as its one-digit square.

[enigma1034]

Enigma 1044: Seven-digit squares

From New Scientist #2200, 21st August 1999 [link]

I have found a 2-digit number that can form (without at any stage reversing the order of the digits) both the first 2 digits and the last 2 digits of both a 5-digit and a 6-digit and a 7-digit perfect square.

Harry and Tom have each found a 2-digit number that can form (without reversing the order of the digits) the first 2 digits of a 5-digit and a 6-digit and a 7-digit perfect square, the last 2 digits of these squares in each case being the same as the first 2 but in reverse order.

Harry’s 3 squares are all palindromes, but Tom’s squares are not all palindromes.

What are the 7-digit squares formed by (1) me, (2) Harry, (3) Tom?

[enigma1044]

Enigma 1046: Albion yet again

From New Scientist #2202, 4th September 1999 [link]

Albion, Borough, City, Rangers and United have played another tournament. Each team played each of the others once. Two matches took place on five successive Saturdays, each of the five teams having one Saturday without a match.

The points scoring system was: 1 point to each team winning on the first Saturday, 2 points to each team that won on the second Saturday, 3 points to each team that won on the third Saturday, 4 points to each team that won on the fourth Saturday, and 5 points to each team that won on the fifth Saturday. But a draw was an allowable result: if a match was drawn each team was awarded half the points it would have been awarded for winning it.

The final table was: Albion won with 7 points, Borough, City and Rangers all tied with 6 points, and United finished last with 5 points. But if they had used the traditional points scoring system that awards a team 2 points for each win and 1 point for each draw the order of the teams would have been reversed: United would have finished with more points than any other team and Albion would have finished with fewest points, the other three teams still tying for second place.

If Borough beat City on the fourth Saturday give the results of Rangers’ matches, listing them in the order in which they were played and naming the opponents in each match.

[enigma1046]

Enigma 1050: Find the link

From New Scientist #2206, 2nd October 1999 [link]

I was trying to construct a chain of 2-digit and 3-digit perfect squares such that each square in the chain had at least two digits in common with each of its neighbours (or with its sole neighbour, if it was at either end of the chain). If a square had a repeated digit that digit only counted more than once in calculating the number of digits that the square had in common with another square if it also appeared more than once in the other square; so 121 had only one digit in common with 100, but 100 had two [digits] in common with 400.

I found that I could construct three totally different chains each consisting of at least five squares; and I made each of these chains as long as possible, consistent with the stipulation that no square should be used more than once. But I could not link these chains into a single long chain until I used one particular 4-digit square as the means of linking one end of my first chain to one end of my second chain and also the other end of my second chain to one end of my third chain. In each place where it was used, this 4-digit square had at least two digits in common with each of its chain neighbours.

(1) Identify this 4-digit square.
(2) Which were the squares at opposite ends of the single long chain?

[enigma1050]

Enigma 1052: Half-dozen doubled

From New Scientist #2208, 16th October 1999 [link]

SIX × TWO = TWELVE

In this problem each letter stands for a different digit and the same letter represents the same digit wherever it appears. No number starts with a zero. SIX, appropriately enough, must be a multiple of 6.

What is the 6-digit number represented by TWELVE?

[enigma1052]

Enigma 1054: Transferred number

From New Scientist #2210, 30th October 1999 [link]

The players in a football team used to wear the numbers 1 to 11, but nowadays each member of a club has a personal number. So Albion’s players are numbers from 1 to 37, except for one number which is unused because the player who wore it has just been transferred.

Last Saturday two Albion teams were playing. In one team the 11 players all wore different prime numbers, in the other team the 11 players all wore different semi-prime numbers. A semi-prime number is the product of two prime numbers; the square of a prime counts as a semi-prime (but 1 is neither prime nor semi-prime).

The sum of the numbers worn by one team last Saturday was the same as the sum of the numbers worn by the other team. If you knew the number of the player who has been transferred, you could deduce with certainty the numbers worn by all the players in each team.

What was the number of the player who has been transferred?

[enigma1054]

Enigma 1057: Recycled change

From New Scientist #2213, 20th November 1999 [link]

The denominations of coins currently in circulation are 200, 100, 50, 20, 10, 5, 2 and 1p. When we pay for an item we quite often exchange fewer coins when change is given than when the exact amount is offered. For instance, an item costing 91p would require at least four coins (50+20+20+1) for the exact amount, but the purchase can be made with the exchange of only three coins (100+1–10) if change is given.

Harry, Tom and I each bought an identical item that cost less than 100p. None of us offered the exact amount, but we each exchanged fewer coins than if we had done so. In fact, we each exchanged the minimum number of coins possible for an item of that price even though we each offered a different amount of money in payment.

I paid first, and Harry and Tom each included a different one of the coins I had received in my change among the coins that they offered.

How much did the item cost?

[enigma1057]

Enigma 1059: Century break

From New Scientist #2215, 4th December 1999 [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 and 7 for black.

Davies potted his first red ball, followed by his first coloured ball, then his second red ball, and so on until he had potted all 15 red balls, each followed by a coloured ball.

After potting 15 red balls and 15 coloured balls, Davies had scored exactly 100 points; but it was interesting because in calling his score after each pot the referee had called every perfect square between 1 and 100.

Question 1: If in achieving this Davies had potted as few different colours as possible, which of the coloured balls would he have potted?

In fact Davies had brought a greater variety to the choice of coloured balls potted: for instance the 2nd, 5th, 8th, 11th and 14th coloured balls potted were all different and if I told you what they were you could deduce with certainty which ball was potted on each of his other pots.

Question 2: What (in order) were the 2nd, 5th, 8th, 11th and 14th coloured balls potted?

(In answering both questions give the colours).

[enigma1059]

Enigma 1061: Par is never prime

From New Scientist #2217, 18th December 1999 [link]

The local golf course has 18 holes; each of them has a par of 3, 4 or 5; no two consecutive holes have the same par. If you play the holes in order from 1 to 18 and score par for each hole, the number of strokes that you have played after you have completed any hole is never a prime number.

If I told you the par for one particular hole you could deduce with certainty the par of each of the first 15 holes.

Question 1: What is the number of the hole whose par I would tell you? And what is par for that hole?

If I told you the number of the hole whose par I was going to tell you so that you could deduce with certainty the par for each of the last three holes you could in fact make that deduction even before I had told you the par for that hole.

Question 2: What is the number of the hole whose par I would be going to tell you? And what is par for that hole?

[enigma1061]

Enigma 1068: Triangular Fibonacci squares

From New Scientist #2224, 5th February 2000 [link]

Harry, Tom and I were trying to find a 3-digit perfect square, a 3-digit triangular number and a 3-digit Fibonacci number that between them used nine different digits. (Triangular numbers are those that fit the formula ½n(n+1); in the Fibonacci sequence the first two terms are 1 and 1, and every succeeding term is the sum of the previous two terms). We each found a valid solution and we each created a second valid solution by retaining two of the numbers of our first solution but changing the other one. Our six solutions were all different.

List in ascending order the numbers in the solution that none of us found.

[enigma1068]

Enigma 1073: Cross-country match

From New Scientist #2229, 11th March 2000 [link]

In cross-country matches, teams consist of six runners. The team scores are decided by adding together the finishing positions of the first four runners to finish in each team. The team with the lowest score is the winner. Individuals never tie for any position and neither do teams because if two teams have the same score the winner is the team with the better last scoring runner.

The fifth and sixth runners to finish in each team do not score. However if they finish ahead of scoring runners in another team they make they make the scoring positions of those scoring runners, and the corresponding team score, that much worse.

In a recent match between two teams, I  was a non-scorer in the winning team. Each team’s score was a prime number, and if I told you what each team’s score was you could deduce with certainty the individual positions of the runners in each team. I won’t tell you those scores, but if you knew my position you could, with the information given above, again deduce with certainty the individual positions of the runners in each team.

(1) What was my position?
(2) What were the positions of the scoring runners in my team?

[enigma1073]

Enigma 1075: No factors

From New Scientist #2231, 25th March 2000 [link]

I have found a five-digit number such that it is impossible to factorise the numbers formed by its first digit or last digit or first two digits or last two digits or first three digits or last three digits or first four digits or last four digits or all five digits. In other words all those numbers are prime except that either or both of the single digit numbers may be unity.

Identify the five-digit number.

[enigma1075]

Enigma 1077: Identical square sums

From New Scientist #2233, 8th April 2000 [link]

I have found three examples of a three-digit number that can be the sum of two three-digit perfect squares in two different ways. One particular perfect square contributes to all three of my examples.

Everything stated above about me is also true of both Harry and Tom, but each of us has a different perfect square contributing to all three examples. One of my examples is the same as one of Harry’s, and another of my examples is the same as one of Tom’s.

(1) Which three-digit number is the sum of each pair of squares in the example that I found but neither Harry or Tom found?

[There is a further example of a three-digit number than can be the sum of two three-digit perfect squares in two different ways that none of us found].

(2) Which three-digit number is the sum of each pair of squares in the example that none of us found?

[enigma1077]

Enigma 1081: Prime cuts

From New Scientist #2237, 6th May 2000 [link]

My supermarket was offering a discount of £2 off the cost of shopping if the bill exceeded a certain number of pounds. I qualified for the discount though my bill exceeded the minimum required for it by less than £1. My bill, both before and after the discount was applied, was for a prime number of pence.

The same discount offer applied the following week and everything stated above was again true of my new bill. Over the two weeks the total cost of my shopping was an exact number of pounds, prime whether or not you take the discounts into account and less than £30.

How much did each of my two bills amount to before the discounts were applied? Remember, there are 100 pence in a pound.

[enigma1081]

Enigma 1083: Trios of semi-primes

From New Scientist #2239, 20th May 2000 [link]

A semi-prime is the product of two prime numbers. Harry, Tom and I each chose a set of three two-digit semi-primes which formed an arithmetic progression, such that the six factors of the three semi-primes in any one set were all different. The first (lowest) number in each of our sets was identical.

We then each chose another such set. This time the middle number in each of our sets was identical.

We then each chose another such set. This time the last (highest) number in each of our sets was identical, and of the other two semi-primes in my set one also appeared in Harry’s set and the other also appeared in Tom’s set.

The nine sets that we chose between us were all different, but one semi-prime appeared in all three sets that I chose.

List the three sets that I chose in the order in which I chose them, with the numbers in each set in ascending order.

[enigma1083]

%d bloggers like this: