Ask The Wizard #89
- Let n bet any integer. Express n as d0*1 + d1*10 + d2*100+ d3*1000+ ... + dn*10n, where dn is the first digit, dn-1 is the second, and so on.
- n = [d0 + d1 + d2 + ... + dn ] + [d1*9 + d2*99+ d3*999+ ...+ dn*999...9 ( a number with n nines)]
- n = [d0 + d1 + d2 + ... + dn ] + 9*[d1*1 + d2*11+ d3*111+ ... dn*111...1 (a number with n ones)]
- 9*any integer is evenly divisible by 9. So if d0 + d2 + d2 + ... + dn , or the sum of digits, is divisible by 9, then the entire number must be divisible by 9.
Now that we have that proof out of the way we can look at this magic trick. The problem asks you to pick any number. Then rearrange the digits to make a second number. Then subtract the smaller number from the larger number.
The answer is always going to have a sum of digits divisible by 9. Why? For every digit in the original number it appears somewhere else in the other number. Going one set of digits at a time, changing all the other numbers to zero, we could boil down each set as +/- n*[10x - 10y] (where x>=y and n is the digit) = +/-n *10y * (10x-y - 1) = 10y * (a number composed of only nines) = a number divisible by 9.
Let’s look at an example. Let the original number be 1965. Scramble it up to get 6951. 6951 - 1965 = 6*(1000-10) + 9*(100-100) + 5*(10-1) + 1*(1-1000) = 6*990 + 9*0 + 5*9 + 6*-999. Note that each part is divisible by 9, thus the number you get after subtracting must also be divisible by 9, and finally the sum of digits is also divisible by 9.
The trick then asks you to circle a number except 0 and enter the sum of all the other digits. The program then only needs to add a number to the number you entered so that the sum is divisible by 9. For example if you said the sum of your digits was 13 then you must have circled a 5, because 13+5 = a number divisible by 9.
The reason you can’t circle a zero is because if you did and then entered a number already divisible by 9 then the program wouldn’t know whether you circled a 0 or a 9.
"For those who sometimes lose too much and later regret their actions some self-constraints may be in order. I would suggest setting a specific loss point in these cases, for example $200. Personally I don’t set such limits on myself. If I’ve lost too much it won’t be fun any more and I’ll step away for that reason."
But for you, what does "too much" mean? On every other web page of your wonderful site, you warn against using gut feelings. But when it comes to losing, you say you stop when it doesn’t feel good. Especially with video poker, I set a bankroll size, and I stop when I lose that. Losing always sucks, whether it’s 1 credit or 300 credits.