My magician gives you 3 regular dice
and asks you to do the following, while he is out of the room:
"Roll them, and write in sequence the three results, followed by a 3digit number representing the hidden sides of the rolled dice.
Once you got the 6â€“digit number, divide it by 111.
THEN CALL ME."
Then he exits and you roll 1,2,4 and write down 124653, divide by 111 and get 1123.
The magician upon entering the room gets the result and quips within a second 1,2,4.
How did he do it?
It isn't clear what "write in sequence the three results" means. If we take it to mean "write the numbers in nondecreasing order" then the following works:
The number created after dividing by 111 is 900a+90b+9c+7.
This is equivalent to 1000a+100b+10c+7c10b100a
(If it weren't for the last two terms we could just read off the answer from the first three digits displayed.)
Now factor the powers of 10
1000a+100(ba)+10(cb)+(7c)
So the result is a 4 digit number.
The first digit is a.
The sum of the first two digits is a+(ba)=b.
The sum of the first three digits is a+(ba)+(cb)=c.
The last digit is (7c)
It is important that each of these digits be at least zero and not more than 9. Being dice rolls (7c) isn't a problem. The necessary stipulation is a=<b=<c. So ordering the dice rolls at the start is crucial.

Posted by Jer
on 20171212 11:47:16 