A $56$-digit number divisible by $13$ Let $N$ be a $56$-digit number with all the digits same except the $32$nd digit from the right which is a different one. If $N$ is divisible by $13$, then which digits can never be the units digit of $N$?
I tried to approach this question with the help of divisibility rules available for $13$ but I was not able to figure out the solution for this. Can someone please explain the way to solve this?
Update : As many of you guys are helping with the solution and thanks for that...I am just putting down the answer over here... the correct answer is 4 and 7.
 A: Notice that $\frac{10^{56}-1}9$ in decimal is a string of 56 ones, so
$$N=a\frac{10^{56}-1}9+(b-a)10^{31}$$
where $1\le a\le9$ is the repeated digit and $0\le b\le9$ is the different digit.
Looking mod 13, we have $9^{-1}=3$, and using that $10^6\equiv1$, we have
$$
10^{56}=(10^6)^910^2\equiv1^910^2\equiv9\\
10^{31}=(10^6)^510^1\equiv1^510^1=10.
$$
Therefore, the statement that $N$ is divisible by 13 is equivalent to the (mod 13) congruence
$$
0\equiv a(9-1)3+(b-a)10\\
0\equiv 14a+10b\\
3b\equiv a.
$$
This means we can use any digit $a$ as long as there is a digit $b$ such that $a\equiv3b$ (mod 13). The first ten multiples of 3, corresponding to $b=0,\dots,9$, are $a=0,3,6,9,12,2,5,8,11,1$. (The next values $a=4,7,10$ correspond to $b=10,11,12$.) So $a$ can't be 4 or 7.
A: Let $N$ have digit $a$ $55$ times and digit $b$ once at $32$nd place from right.
Now $13$ divides any block of six same consecutive digits $$13 \mid a\cdot 111111 \cdot 10^m \quad , \quad m \in \{0,1,2,\ldots\} $$
There are five blocks of $aaaaaa$ before $31$st digit and four blocks of $aaaaaa$ after $32$nd digit. So $13$ divides $N$ iff $13$ divides the remaining two digit number formed by $32$nd and $31$st digits.
$$13 \mid ba$$
Looking at two-digit multiples of $13$, $a$ cannot be $0,4,7$.
