Enigmatic Code

Programming Enigma Puzzles

Category Archives: braintwister

BrainTwister #19: Angular arrangements

From New Scientist #3490, 11th May 2024 [link] [link]

A regular polygon is a shape with at least three straight sides where all the sides are the same length and all the interior angles are equal.

Knowing that a full turn is 360° and the angles in a triangle add up to 180°:

(a) Can you use this diagram to work out the size of the interior angles in this regular pentagon? Hint: an interior angle is made up of two adjacent angles from the outer corners of the triangle.

(b) Can you use the same idea to find a general way to calculate the interior angle of any regular polygon?

It is possible to arrange regular polygons around a point so they meet without leaving any gaps. Below is one such arrangement, using squares and equilateral triangles:

There are other ways to arrange regular polygons so they meet exactly at a point.

(c) How many can you find?

(d) What is the maximum number of sides a polygon in such an arrangement can have?

[braintwister19]

BrainTwister #18: The arithmetical two-step

From New Scientist #3489, 4th May 2024 [link] [link]

You must take two steps to get from a given number to make 10. Each step must change the number by adding, subtracting, multiplying by or dividing by a number from 1 to 9. (Multiplying or dividing by 1 isn’t allowed as it doesn’t change the number).

For example, starting with 35, one way would be to first divide by 7 then add 5.

(a) Can you take two steps to get from 42 to 10?

(b) Is it possible to get to 10 in two steps from all the numbers 11 to 30?

(c) And can you find a two-digit number for which there is no way to get to 10 in two steps?

[braintwister18]

BrainTwister #17: Semi-one numbers

From New Scientist #3488, 27th April 2024 [link] [link]

When you count up to 2, exactly half of the numbers contain the digit “1”. We can use the term “semi-one numbers” to describe numbers with this property.

(a) The same is true of a number between 15 and 20. Which one?

(b) What is the next semi-one number after that?

(c) Could there be infinitely many such numbers?

The setter is given as: “Colin Wright (with thanks to Adam Atkinson)”.

[braintwister17]

BrainTwister #16: Order, order!

From New Scientist #3487, 20th April 2024 [link] [link]

(a) Arrange the digits 1-9 in a line so that each pair of adjacent digits differs by either 2 or 3.

(b) Arrange the digits 1-9 in a line so that each pair of adjacent digits sums to a prime number.

(c) Now arrange the digits 1-9 in a line so that each pair of adjacent digits (when read as a two-digit number) appears in the times tables from 1 × 1 up to 9 × 9.

[braintwister16]

BrainTwister #15: Domino strips

From New Scientist #3486, 13th April 2024 [link] [link]

There are three ways to cover a 3 × 2 grid with dominoes.

How many ways are there to cover a 4 × 2 grid? What about a 6 × 2 grid?

Can you find a pattern that would help you work out the number of different ways dominoes can be used to cover any n × 2 rectangle?

[braintwister15]

BrainTwister #14: Factor graphs

From New Scientist #3485, 6th April 2024 [link] [link]

To construct a factor graph, we dot numbers around a page and draw lines between pairs where one is divisible by the other. Start by writing the numbers 1 and 2, and join them with a line – since 2 is divisible by 1. Then write 3 and join it only to 1 (since 3 is divisible by 1 but not 2). The number 4 would connect to 1 and 2 but not 3, and so on. The connecting lines need not be straight.

Can you continue adding numbers and connecting them to their factors until you have all the numbers from 1 to 10, but without any of the lines crossing anywhere? (You may need to redraw if you get stuck).

How many more numbers can you add before this becomes impossible?

If you don’t include the number 1 in your graph and instead start from 2, how many numbers can you add without creating lines that cross?

[braintwister14]

BrainTwister #13: Number Venns

From New Scientist #3484, 30th March 2024 [link] [link]

Numbers 1–30 are put in circle A if they are part of group A, in circle B if they belong to group B, in the intersection between if they are part of both A and B, or outside the circles if they don’t belong to either A or B. What are groups A and B for each diagram below (not all numbers have been placed yet)?

Only one of these diagrams can have another number added to the overlapping section using these rules.

Which diagram is it? And what is that number?

[braintwister13]

BrainTwister #12: Factorial factory

From New Scientist #3483, 23rd March 2024 [link] [link]

Mathematicians write 9! to represent the number “9 factorial”, which means 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 362,880.

How many zeros will 10! end with?

How many zeros will 25! have at the end? (Careful, the answer isn’t five.)

How many zeros will 1066! finish with?

[braintwister12]

BrainTwister #11: Club shuffling

From New Scientist #3482, 16th March 2024 [link] [link]

I play golf with three of my friends, and we split into two teams for each game, one team against the other. We change partners after each game until every possible pair of teams has played.

How many games will be played altogether?

If I win all my games, how many games can each other person win? What if I lose all my games?

If we add two more friends to the group and play in two teams of three instead, how does this change the answers to the questions above?

[braintwister11]

BrainTwister #10: Chairs in pairs

From New Scientist #3481, 9th March 2024 [link] [link]

Abbie and Bryn are allocated places to sit at random in a row of four seats.

(1) What is the probability that they are put next to each other?

(2) What if there are 20 seats?

On a different occasion, Abbie and her friend Ana have booked two adjacent spots on the front row, which is 22 seats long. Bryn and his friend Beth also have two adjacent seats among the 22.

(3) What is the probability the two groups are next to each other?

[braintwister10]

BrainTwister #9: Rectangulator

From New Scientist #3480, 2nd March 2024 [link] [link]

Given a standard calculator keyboard, press — in order, going either clockwise or anticlockwise — four digit keys that form the corners of a square or rectangle on the keypad. This will create a four-digit number, e.g. 7469.

(1) If the first button you press is the 7 key, how many possible four-digit numbers can you create?

(2) What about if your square or rectangle is allowed to have a height or width of zero?

(3) Can you show that for any square or rectangle you choose, the resulting four-digit number will always be divisible by 11?

[braintwister9]

BrainTwister #8: Two cubes

From New Scientist #3479, 24th February 2024 [link] [link]

A frame is made from two cubes joined together. All edges on each of the cubes measure 1 unit.

(1) What is the distance between the two points on the frame marked with red dots?

(2) Can you find another pair of points on the frame, one for which the distance apart is the square root of 3?

(3) For how many whole number values of n can you find pairs of points on the frame whose distance is the square root of n?

[braintwister8]

BrainTwister #7: Home primes

From New Scientist #3478, 17th February 2024 [link] [link]

To find the home prime of a number, follow this procedure: first, find its prime factors; then concatenate these by writing the prime factors in size order to form a new number using all of their digits; then repeat until the resulting number is prime.

For example, 9 = 3 × 3, so its prime factors are 3 and 3. These concatenate to give 33. Now, find the prime factors of 33. They are 3 and 11, which concatenate to give 311. Since 311 is prime, we stop and say that the home prime of 9 is 311.

The home prime of a prime number is the number itself. So, for example, the home prime of 2 is 2.

(1) What is the home prime of 6?
(2) How about the home prime of 10?
(3) Which number less than 20 has a home prime of 1129?

[braintwister7]

BrainTwister #6: Factor factory

From New Scientist #3477, 10th February 2024 [link] [link]

The factors of 12 are 1, 2, 3, 4, 6 and 12.

It has four even factors and two odd factors, so two-thirds of its factors are even.

(1) What fraction of the factors of 8 are even?

(2) How many whole numbers between 1 and 100 have the property that exactly half of their factors are even?

(3) How many whole numbers between 1 and 1 million have the property that exactly one-third of their factors are divisible by 3?

[braintwister6]

BrainTwister #5: Diagonal lines

From New Scientist #3476, 3rd February 2024 [link] [link]

A square has two diagonals (lines that run from one corner to a different corner, but not between two corners on the same edge).

How many diagonals does a pentagon have? What about a hexagon?

What kind of regular polygon has a number of diagonals that is three times the number of its corners?

[braintwister5]

BrainTwister #4: Addition subtraction

From New Scientist #3475, 27th January 2024 [link] [link]

It is true that:

1 + 2 + 3 = 3 + 2 + 1

and the equation remains true if you remove two of the plus symbols:

1 + 23 = 3 + 21.

Starting from the equation:

1 + 2 + 3 + 4 = 4 + 3 + 2 + 1

delete three of the plus symbols so the equation is still true.

Can you find a way to do the same for:

1 + 2 + 3 + 4 + 5 = 5 + 4 + 3 + 2 + 1

but this time by removing a different set of three pluses than you did in the previous case?

[braintwister4]

BrainTwister #3: Page turner

From New Scientist #3474, 20th January 2024 [link] [link]

When printing books, the page numbers are included in the corner of each page.

If a book has 24 pages, how many digits are used in printing all the page numbers?

If a book uses 183 digits in printing all the page numbers, how many pages does it contain?

If another book uses 636 digits in printing all the page numbers, how many pages does it have?

[braintwister3]

BrainTwister #2: Piles of money

From New Scientist #3473, 13th January 2024 [link] [link]

You are given a heap of N tokens, which you may divide into any number of smaller heaps. You will then receive an amount of money equal to the product of the number of tokens in each heap. The rules of this game state that if you were to just leave all the tokens in one heap, you would win £N.

What is the largest sum of money you can win starting with six tokens?

What about starting with 10 tokens?

Is there a general best strategy for N tokens?

[braintwister2]

BrainTwister #1: Digital sevens

From New Scientist #3472, 6th January 2024 [link] [link]

Welcome to our new puzzle column!

Our devious BrainTwister enigmas will start with a first step, then add a twist (or two) to get you thinking about the problem differently.

61, 14234, 25, 1111111 and 95 are all numbers whose digits add to a multiple of 7.

(1) What is the next number after 95 whose digits add to a multiple of 7?

(2) Can you find a pair of consecutive numbers whose digits both add to multiples of 7?

(3) What about a pair of numbers under 100 whose digits both add to multiples of 7, but that are two apart rather than consecutive?

This is the first puzzle in the new BrainTwister series.

[braintwister1]