Find the $26^{th}$ digit of a $50$ digit number divisible by $13$. $N$ is a $50$ digit number (in the decimal scale). All digits except the $26^{th}$ digit (from the left)
are $1$. If $N$ is divisible by $13$, find the $26^{th}$ digit.
This question was asked in RMO $1990$ and is very similar to this question and the same as this question but it is not solved by the approach used by me whereas I want to verify my approach.
My approach:
Suppose $N=111\cdots a\cdots111$ and $N\equiv 0\pmod {13}$
Now $N=10^{49}+10^{48}+\ldots+a10^{24}+\ldots+10+1=(10^{49}+10^{48}\ldots+10+1)+(a-1)10^{24}$
$N=\dfrac{10^{50}-1}{9}+(a-1)10^{24}$
Now $10^{12}\equiv 1\pmod {13}\Rightarrow 10^{24}\equiv 1\pmod {13}$ by fermat's little theorem.
Thus $(a-1)10^{24}\equiv (a-1) \pmod{13}\Rightarrow \dfrac{10^{50}-1}{9}\equiv 1-a\pmod{13}$ since $N\equiv 0\pmod{13}$
$10^{24}\equiv 1\pmod{13}\Rightarrow 10^{48}\equiv 1\pmod{13}$ or $10^{50}-1\equiv -5 \pmod{13}$
Now $10^{50}-1\equiv -5\pmod {13}\Rightarrow 9(1-a)\equiv -5\pmod{13}$
$a=3$ clearly satisfies the above conditions
$\therefore$ The $26^{th}$ digit from the left must be $3$.
Please suggest what is incorrect in this solution and advice for alternative solutions.
THANKS

Another way is to use the trick from Wikipedia (that doesn't solve your solution)
Taking $N$ from the right, and applying the sequence $(1, −3, −4, −1, 3, 4)$ as instructed on the page (multiply the digits from the right by the given numbers in sequence), we get
$0$ for the 6 first digits from the right ($1-3-4-1+3+4=0$), repeating the sequence, $0$ up to digit 24 (from right), we still have $0$
Then, the next $6$ are our $a$ and $5\times 1$, or
$$a-3-4-1+3+4\\=a-1$$
We did $30$ digits, $20$ to go. The next $18$ will give $0$, the last $2$ give $1-3$, thus the whole sum is $$a-1-2=a-3$$
The only digit that would have $a-3\equiv 0\pmod {13}$ is $$\bbox[5px,border:2px solid #ba9]{a=3}$$
