A magician asked a spectator to think of a three-digit number ABC and then to tell him the sum of numbers ACB, BAC, BCA, CAB, and CBA. He claims that when he knows this sum he can determine the original number. Is that so?
Let S=given sum of 5 permutations and (100a+10b+c)=number thought of.
100a+10b+c + S = 222(a+b+c).
Then p + (100a+10b+c+q)/222 = a+b+c where 100a+10b+c = 222n - q for integer n, making a+b+c = p+n.
Subtract the last 2 equations giving 5n = (p+q) mod 9.
So if you choose 612 and you tell me the sum S=1386, I get, in turn, p=6, q=54, n=3, 100a+10b+c = 222*3-54=612.
Zeros aren't a problem. You pick 105 and tell me 1227, I get p=5, q=117, n=1, 100a+10b+c=1*222-117=105. It's magic!
Posted by xdog
on 2013-02-23 15:45:22