Many years ago, I learned an easy way to determine if a number (integer) is evenly divisible by 3: Just add up the digits and if the result is divisible by 3, so is the original number. For example, 12: 1 + 2 = 3, so 12 is evenly divisible by 3; 257: 2 + 5 + 7 = 14, then 1 + 4 = 5, so 257 is not evenly divisible by 3; but 255: 2 + 5 + 5 = 12 which is divisible by 3, so 255 is divisible by 3. The last two examples also point out that you can either stop after adding the digits of the original number or continue recursively until you get a single digit.
My question is, why does that work? And the related question: why doesn’t it work for any other number? For example, 12 is evenly divisible by 2, but 1 + 2 = 3, which is not evenly divisible by 2. 12 is also evenly divisible by 4, but 3 is not. 25 is evenly divisible by 5, but 2 + 5 = 7, which is not. 36 is evenly divisible by 6, but 3 + 6 = 9, which is not. Etc.
So what’s so special about the number 3 that this works only for that one number?