TITLE: Why $9$ & $11$ are special in divisibility tests using decimal digit sums? (casting out nines & elevens)
QUESTION [68 upvotes]: I don't know if this is a well-known fact, but I have observed that every number, no matter how large, that is equally divided by $9$, will equal $9$ if you add all the numbers it is made from until there is $1$ digit.
A quick example of what I mean:

$9*99 = 891$
$8+9+1 = 18$
$1+8 = 9$

This works even with really long numbers like $4376331$
Why is that? This doesn't work with any other number. Similarly for $11$ and alternating digits sums.

REPLY [2 votes]: The "specialness'' of $9$ stems from the fact that $10 \equiv 1 \pmod{9}$. 
So, in our base-10 numeral system in which an integer can be expressed as
$$ d_{k}d_{k-1} \ldots d_{1}d_{0} = d_{k}10^{k} + d_{k-1}10^{k-1} + \ldots + d_{1}10 + d_{0}$$
$$ \equiv d_{k}(1) + d_{k-1}(1) + \ldots + d_{1}(1) + d_{0} \pmod{9},$$
all we need to do is to evaluate the sum $d_{k} + d_{k-1} + \ldots + d_{1} + d_{0}$ and check to see if it is divisible by $9$ in order to determine if the given integer is divisible by $9$.
Finally, note that a similar test with analogous justification also exists for determining if a given integer is divisible by $3$, as $10 \equiv 1 \pmod{3}$.