There are no rabbits pulled out of hats here – these tricks rely on mathematical principles and will never fail you, says Peter Rowlett.

LOOK, I’ve got nothing up my sleeves. There are magic tricks that work by sleight of hand, relying on the skill of the performer and a little psychology. Then there are so-called self-working magic tricks, which are guaranteed to work by mathematical principles.

For example, say I ask you to write down a four-digit number and show me. I will write a prediction but keep it secret. Write another four-digit number and show me, then I will write one and show you. Now, sum the three visible numbers and you may be surprised to find the answer matches the prediction I made when I had only seen one number!

The trick is that while the number I wrote and showed you appeared random, I was actually choosing digits that make 9 when added to the digits of your second number. So if you wrote 3295, I would write 6704. This means the two numbers written after I made my prediction sum to 9999. So, my prediction was just your original number plus 9999. This is the same as adding 10,000 and subtracting 1, so I simply wrote a 1 to the left of your number and decreased the last digit by 1. If you wrote 2864, I would write 12863 as my prediction.

Another maths trick involves a series of cards with numbers on them (pictured). Someone thinks of a number and tells you which of the cards their number appears on. Quick as a flash, you tell them their number. You haven’t memorised anything; the trick works using binary numbers.

Regular numbers can be thought of as a series of columns containing digits, with each being 10 times the previous. So the right-most digit is the ones, to its left is the tens, then the hundreds, and so on. Binary numbers also use columns, but with each being worth two times the one to its right. So 01101 means zero sixteens, one eight, one four, zero twos and one one: 8+4+1=13.

Each card in this trick represents one of the columns in a binary number, moving from right to left: card 0 is the ones column, card 1 is the twos column, etc. Numbers appear on a card if their binary equivalent has a 1 in that place, and are omitted if it has a 0 there. For instance, the number 25 is 11001 in binary, so it is on cards 0, 3 and 4.

You can work this trick by taking the cards the person’s number appears on and converting them to their binary columns. From there, you can figure out the binary number and convert it to its regular number. But here’s a simple shortcut: the binary column represented by each card is the first number on the card, so you can just add the first number that appears on the cards the person names. So, for cards 0 and 2, you would add 1 and 4 to get 5.

Many self-working tricks embed mathematical principles in card magic, memorisation tricks or mind-reading displays, making the maths harder to spot. The key is they work every time.

For more such insights, log into www.international-maths-challenge.com.

*Credit for article given to **Peter Rowlett***