Let $R_n = \underbrace{11\ldots1}_{n}$.
1) Prove that if $n \mid m$, then $R_n \mid R_m$.
2) Prove that if $(n, m) = 1$, then $(R_n, R_m) = 1$.
I have solved only the first task:
$$m = nk \Rightarrow R_m = \underbrace{11\ldots1}_{nk}\\ R_m = R_n \cdot \underbrace{1\underbrace{00\ldots0}_{n-1}1\underbrace{00\ldots0}_{n-1}1 \ldots 1\underbrace{00\ldots0}_{n-1}1}_{k \mbox{ of } 1}$$
Using the sum of geometric progressions, we can write that $R_n = \frac{10^n-1}{9}$. But I don't know how to continue the second task. Can you help me solve it? Thanks!
1) Write $m=nk$ then $$10^m-1 =10^{nk}-1 = (10^n-1)\Big((10^n)^{k-1}+...+10^n+1\Big)$$ so $$10^n-1\mid 10^m-1\implies R_n\mid R_m$$
Hint for 2):
Use the fact that $$\gcd(a^n-1,a^m-1)= a^{\gcd (m,n)}-1$$