[Math] Finding divisibility of a number using modular arithmetic

discrete mathematicselementary-number-theorymodular arithmetic

Let N = 12345678910111213141516171819. How can I use modular arithmetic to show that N is (or isn't) divisible by 11? In general, how can I apply modular arithmetic to determine the divisibility of an integer by a smaller integer? I am finding modular arithmetic very confusing and unintuitive. I can understand "simple" modular arithmetic like the 24-hour day etc. but when it comes down to finding the modulo of high raised powers, or checking divisibility of large integers, I am totally lost.

Best Answer

First, since $10\equiv -1$ (mod $11$), notice that $10^k\equiv (-1)^k$ (mod $11$). Then, given your number, which can be written more generally as $$ d_n10^n+d_{n-1}10^{n-1}+\dots+d_1\cdot10+d_0, $$ consider what the above expression is (mod $11$). When the above is looked at "with mod 11 goggles on," all of the instances of $10^k$ can be replaced with $(-1)^k$, which leaves an alternating sum of digits.

Related Question