A number N is formed by writing 9 for 99 times. What is the remainder if N is divided by 13?
A number N is formed by writing 9 for 99 times. What is the remainder if N is divided by 13?
11
9
7
1
Solution
N consists of 99 nines, so $N = 10^{99} - 1$. We need $(10^{99} - 1) \bmod 13$. Powers of 10 mod 13 have period 6: $10^6 \equiv 1 \pmod{13}$. Since $99 = 6 \times 16 + 3$, $10^{99} \equiv 10^3 \pmod{13}$. $10^3 = 1000 \equiv 12 \pmod{13}$. So $N \equiv 12 - 1 = 11 \pmod{13}$. Remainder is 11.