$11\mid 231$ because $2 - 3 + 1 = 0$: What divisibility test is this? I am told that $11 \mid 231$ because $2 - 3 + 1 = 0$.
Could people please explain to me what divisibility test is this? Thanks.
 A: A way of seeing this is the following. Let $N \in \mathbb{Z}$, with its decimal expansion being 
$$
N = \sum_{i = 0}^ka_i10^i
$$
For example, if $N = 456$, we have $N = 4 \cdot 10^2 + 5 \cdot 10^1 + 6 \cdot 10^0$. Now, $N$ will be divisible by $11$ iff $N \equiv 0 \pmod{11}$, that is, if and only if
$$
0 \equiv \sum_{i = 0}^ka_i10^i \equiv \sum_{i = 0}^ka_i(-1)^i \pmod{11}
$$
where here we use that $10 \equiv -1 \pmod{11}$. Thus, a number will be divisible by $11$ if and only if the alternating sum of its digits is.
A: It is this test: if the decimal expansion of a number $n$ is $d_kd_{k-1}\ldots d_1d_0$, then $11\mid n$ if and only if $n\mid d_0-d_1+d_2-\cdots+(-1)^kd_k$.
This follows from the fact that $n=\sum_{j=0}^kd_j10^j$ and that $10^j\equiv(-1)^j\pmod{11}$, for each natural $j$.
A: $$231 = 2\cdot 100+3\cdot 10+1\cdot 10^0 \equiv_{11} 2\cdot (1)+3\cdot (-1)+1\cdot (1) =\color{red}{2 -3+1 =0}$$
A: This is the divisibility test for $11$
If the difference of the alternating sum of digits of $N$ is a multiple of $11$. 
Example: $2343$ is divisible by $11$ because $2-3+4-3=0$ which is a multiple of $11$ 
A: The remainder of $10^k$ modulo $11$ is $(-1)^k$, as $10$ and $-1$ have the same remainder. 
So given a positive integer $a_na_{n-1}\cdots a_1a_0= a_010^0+a_{1}10^{1}+\cdots +a_{n-1}10^{n-1}+a_{n}10^{n}$, its remainder modulo $11$ is $a_0-a_{1}+-\cdots +a_{n-1}(-1)^{n-1}+a_{n}(-1)^{n}$. 
So you just have to add the digits with alternating signs. 
Two important things: 


*

*start from the last digit, that has positive sign

*you can iterate this. So the remainder of $18332107$ is the same as the remainder of $13$ is the same as the remainder of $2$, so $2$.

A: Suppose you list a number as a list of number starting from the ones digits. 
$N = [d_0,d_1,d_2,...]$
For instance, 4325 would be written as [5,2,3,4].
Then $11N$ would be $[d_0,d_0+d_1,d_1+d_2,d_2+d_3,...,d_k]$. 
In the example of $N=4325$, $11N$ would be 47575, or [5,7,5,7,4], or [5,5+2,2+3,+3+4,4]. You can do long multiplication to see this, or note that $11N = 10N+N$. Multiplying by ten shifts the digits over, so you have  $[0,d_0,d_1,...]+ [d_0,d_1,...] = [d_0,d_0+d_1...]$.
So when you alternately add and subtract digits, you get $d_0-(d_0+d_1)+(d_1+d_2)-(d_2+d_3)...=(d_0-d_0)+(-d_1+d_1)+(d_2-d_2)+d_3 ... = 0$.
So without carries, this alternating sum will always be zero. With carries, you're subtracting 10 from one power of ten and adding one to the next. With the alternating sum, the signs of those will be different, so you'll either subtract ten from the sum, then subtract one, or add one, then subtract a negative one. Either way, you're changing the sum by a multiple of 11.
Example:
57*11 gives 5 in the hundred place, 12 in the tens place, and 7 in the ones place. So if you were to do an alternating sum, you would get 5-12+7. But 12 isn't a digit, so you have to carry the 1 from the tens place to the hundreds place. In doing so, you're changing the 5 to a  6 (adding 1), and changing the 12 to a 2 (subtracting 10). In your alternating sum, you have (5+1)-(12-10)+7. You're adding one to the first parentheses, and subtracting negative ten for the second, which means that you're increasing the result by 11.
