Here’s an explanation I forwarded to a friend when I got forwarded this trick for about the 1000th time:
Simple algebra. Supposed your initial number is some 2-digit number, like ‘43’. This can be expressed as
10 * x + y where x is the “10s” digit and y is the “units” - in this case x = 4 and y = 3.
So then do what the instructions say - add up the digits: x + y. ( 4 + 3 = 7 )
Subtract from original number: (10 * x + y) - (x + y) = 10x + y - x - y = 9x. Or with the example 43: (10 * 4 + 3) - (4 + 3) = 10 * 4 + 3 - 4 - 3 = 10 * 4 - 4 = 9 * 4 = 36.
Therefore, the result is always some multiple of 9. On the chart, even though the symbols change from time to time, all the multiples of 9 have the same symbol, so the program can safely “guess” that you picked one of the multiples of 9 - 9, 18, 27 etc.