You are here

The Number Guessing Party Magic Puzzle

The Number Guessing Party Magic Puzzle

Think of any number between 1 and 100. Divide by 3, 5, 7 and tell me the remainder each time. I will give you back your number. How could I do it?

Can you do it by a simple method?

Recommended time to solve 30 minutes if you take the right path by deductive reasoning and math logic.

This puzzle needs just the basic knowledge of elementary mathematics to solve.

Solution to the Number Guessing Party Magic Puzzle : Boomerang puzzle

Step 1: Making the first key conclusion

The prime elements of interest are the three remainders of division of a number by 3, 5 and 7 respectively.

As "I" in the puzzle could deduce the correct number you thought of each time then by logical reasoning, it is certain,

  • Conclusion 1: Each set of three remainder is unique for each number within the range of 2 and 99.

This is the basis of further steps in the solution.

Aside: This unique signature of a number in the three remainders can be proved by exhaustive enumeration of the remainders for all numbers in the range or by elementary maths. Both are long and time consuming. So, not necessary to arrive at the solution.

Step 2: Preliminary idea on how the target number can be deduced from a set of three remainders

It is clear, to get the target number from three remainders, a mathematical operation on them is needed. And that magic rule will work correctly for all numbers in the range.

To get an idea of such a rule we will make a small trial for all numbers that are divisible by 5 and 7 but not by 3.

The numbers are only two: 35 and 70.

Remainders for 35: (2,0,0).....first remainder for division by 3, second by 5 and third by 7.

Remainders for 70: (1,0,0).

From the second set of remainders, first rule is formed easily,

  • First rule: Multiply the remainder for division by 3 by 70 to get the target number.

When I apply this rule to remainders for 35, I get 140 by multiplying 70 by 2.

  • Question is: How can I get 35 from 140?

In this case, a bit of discovery needed, and I notice,

  • Second rule: I will get 35 from 140 by just subtracting 135 from the result of multiplying remainder 2 by the multiplier 70.

As a single rule for all numbers is needed,

  • Question now is: how to combine the two rules into one?

With a little math pattern identification I combine the two rules into one as,

  • Third combined rule: Multiply the remainder for division by 3 by 70, divide the result by magic number 105 and the remainder will be the target number.

For 70, the quotient of dividing 70 by 105 is 0 and remainder 70.

For 35, the quotient of dividing 140 by 105 is 1 and remainder 70.

Now we make a major conclusion by deductive reasoning,

  • Conclusion 2: As the combined third rule works for two numbers on remainder for division by 3, it must work for all numbers on remainders for division by 3. Otherwise, if there were a second rule for other such numbers, it won't have worked for these two numbers.

Aside: We call this deductive reasoning as it most likely is true under the circumstances, but not conclusively proved so by math or comprehensive logic.

  • Deductive Conclusion 3: In the same way there must be a unique multiplier the remainder on division by 5 and 7.

Sep 2: Finding multipliers for remainders by division of 5 and 7

The same way as we have done in case of division by 3 only, take up the numbers that are not divisible by 5 by divisible by both 3 and 7.

The numbers are multiples of 21: 21, 42, 63 and 84 - the fifth multiple 105 is out of range.

Remainder sets are: 21: (0,1,0), 42: (0,2,0), 63: (0,3,0) and 84: (0,4,0).

  • Fourth Rule: The multiplier for remainder of division by 5 is then 21 and I get each target number by multiplying the remainder by 21. What about division of 105? Yes, that also works, as in each case quotient is 0 and remainder is the target number.

Observation: By the same logic as before, this multiplier for remainder of division by 5 must be the same for all numbers. And the fourth rule also holds good for all such numbers.


  • Question is: The third comprehensive rule for 3 and the fourth comprehensive rule for 5 are two different rules though same in nature. How to combine the two in a single rule.

At this point deductive reasoning comes into play. The easiest and most sensible way (which most probably will work) is to,

  • Fifth rule: Multiply the remainder for 3 by 70 and remainder for 5 by 21, add the two, divide the result by 105 and get the remainder as the target number.

For all the six numbers we have analyzed, this more advanced combined rule will work (because for the first pair of numbers, remainders for 5 were 0 and for the second set of four numbers remainders for 3 were 0).

We need now to find the multiplier for division by 7.

Finding multiplier for 7 and the final combined single rule

The same way, we will choose now the small set of numbers that are divisible by both 3 and 5 but not by 7.

These are multiples of 15: 15, 30, 45, 60, 75 and 90 with remainder sets 15:(0,0,1), 30:(0,0,2), 45:(0,0,3), 60:(0,0,4), 75(0,0,5) and 90:(0,0,6).

The multiplier for 7 is then 15 and the sixth combine general rule for all numbers we have considered till now is,

Sixth combined final rule: Multiply remainder for division by 3 by 70, for 5 by 21, for 7 by 15, add these up, divide by 105 and the remainder will give me the target number.

For all numbers considered till now this single rule works. By deductive reasoning,

Final conclusion: As any other rule for any other number will jeopardise finding the numbers considered till now, the rule that should work for all numbers in the range should be the sixth combined final rule.

Not sure? To increase confidence, we will take up randomly three numbers not divisible by any of 3, 5 or 7: 2, 64, 89.

For 2 remainders: (2,2,2) : (140+42+30) - 210 = 2.

For 64, remainders: (1,4,1) : (70+84+15) - 105 = 64.

For 89, remainders: (2,4,5) : (140+84+75) - 210 = 299 - 210=89.

I can assume the rule to be the one I was looking for with near certainty, but to be totally sure, I test for all numbers in the range and satisfy myself fully.

Now I can entertain all my friends by the number guessing magic.

Aside: My source of the puzzle is the legendary puzzler Henry Dudeney in his book 536 Puzzles and Curios Problems. Interestingly, his solution prescribed just to subtract 105 from the sum of the remainder products. It is surprising that the solution in the book is incomplete. My deductive reasoning says, he must have tested on a few numbers and missed the cases where the sum is less than 105 or more than 210. The whole problem may also be mathematically treated, but that will be way too long and boring.

What do think of my solution? Does it make sense? Do you have a better solution?

Puzzles you may enjoy

Easy to hard brain teasers with systematic solutions

Challenging brain teasers with solutions: Long list.

This will always be the most up-to-date full list with the brain teasers classified into categories that can be browsed separately.