@Jeruba , My brief explanation of modular arithmetic is the best that I can do. When people do a division, they tend to disregard the remainder, but these remainders have a life of their own, and they are at the heart of modular arithmetic. Put as succinctly as I can, the remainder when divided by n of the sum of two numbers is the sum of their remainders when divided by n, and similarly the remainder of the multiplication of two numbers is the product of their remainders. If we call r(x,n) the remainder of x when dividing by n then r(x+y,n)=r(x,n)+r(y,n) and r(xy,n) = r(x,n)r(y,n)
What is special about 9 is that the remainder of 10 when divided by 9 is 1. Using the multiplication rule for remainders, that means that any number 10 raised to the power of n (n multiplications of 10) will have a remainder of 1 raised to the power of n, which equals 1. For a number like 700, the remainder when dividing by 9 is 7 times the remainder of 100 when divided by 9, giving 7×1 = 7. It follows that to find the remainder when dividing by 9 for a number like 251, you just add up the digits to get 2+5+1=8 as the remainder when divided by 9. If we want to find the remainder of 251×476, we add the digits for each number and then the multiplication rule says that we just multiply those digit sums to get the remainder of 251×476, without having to carry out the full calculation. If someone calculates 251×476, the sum of the digits of the product must match the previously calculated remainder. That is how casting out 9’s works.