How to get a number that is divisible by $n$ - without obviously seeing it?

377 Views Asked by At

There are lots of tricks where someone has to think of a number and you can 'guess' that number by just asking a couple of questions (see, for example, here). I'm looking for something kind of similar: a way to change an unknown number (by multiplying or adding something, etc.) so that it is divisible by some predefined number $n$. As I need this for some kind of math trick, the way to go should not be too obvious. So for example, if I told someone:

Think of a number. Now multiply it by 3.

it would be quite obvious that the resulting number is divisible by 3. Also, it should not be a too complicated algorithm. So, is there any much less obvious but still easy way of changing a number so that it is always divisible by some predefined number $n$?

I probably should add that I don't look for an algorithm that works for any $n \in \mathbb{N}$, it's enough if the algorithm just works for one $n$.

3

There are 3 best solutions below

0
On BEST ANSWER

There are tricks based on the fact that a number's value mod $9$ is invariant under permutations of its digits. So, for instance, if you say "think of a 4-digit number", and then "reverse its digits and find the difference between the original and reversed numbers," the results will always be divisible by $9$.

Also, since $1001=7\times11\times 13$, taking any 3-digit number and concatenating it with itself yields a number that is divisible by $7$, $11$, and $13$.

0
On

For a trick, it is a good idea to keep things simple and do something like "Add 5, multiply the result by two, and add the original number."

You can then remove 10 yourself to get three times the original number.

Another way to get a number divisible by three: Let people reverse the order of digits in their number and calculate the difference between the original number and the result. Variations of these work for 9, 11, 7, 13.

3
On

How about Fermat's Last Theorem? Then just subtract $1$.