<s>[INST] If a number is rational, then it has a periodic decimal expression? I have proved the following: 

If the decimal expansion of a number is periodic, then it is a rational number. 

Now I am trying to prove the converse. For this, I am taking the rational numbers smaller than $1$, that is $\frac{m}{n}$ with $n>m$ because any rational bigger than $1$ can be written as $x$ + $\frac{m}{n}$ with $x\in \Bbb{Z}$. Trying to mimic the process of long division, I write:
$$m=0\cdot n + m$$
Now we multiply $m$ by $10$ and hence:
$$10m=a_1 \cdot n + r_1$$
Now we divide the remainder:
$$r_1=a_2 \cdot n+ r_2$$
And so on. This gives us the decimal expansion: $0,r_1 r_2 r_3...$. Now, by definition $0\leq r_i <n$ and then, $r_i$ divided by $n$ leaves remainder $r_i$. And then for $i\geq 2$ we have that $a_i=0$ and hence:
$$r_i=r_{i+1}$$ 
Is this correct? 
 [/INST] EDIT: I'd like to elaborate on something I glossed over in this answer originally - namely, why we can assume that "...we necessarily hit a repeat remainder." The added explanation is included at the bottom of the answer (to keep it readable). 

I think you're on the right track. But the idea here is, for $\frac{p}{q}$ with $p < q$, when we take $10p = n_1q + r_1$, there are only finitely many remainders $r < q$ that are possible. We keep using the division algorithm, $10r_1 = n_2q + r_2$, $10r_2 = n_3q + r_3$, etc., until we necessarily hit a repeat remainder$^*$; that is, one with $r_k = p$. Then $p = \frac{n_1q}{10} + \frac{n_2q}{100} + \cdots \frac{n_kq}{10^k} + \frac{p}{10^k}.$
Therefore we have $\frac{p}{q} = \frac{n_1}{10} + \cdots + \frac{n_k}{10^k} + (\frac{1}{10^k}\cdot\frac{p}{q}).$ But then $\frac{p}{q}\cdot(1 - \frac{1}{10^k}) = \frac{n_1}{10} + \cdots + \frac{n_k}{10^k}$, so $$\frac{p}{q} = \left(\frac{1}{1-\frac{1}{10^k}}\right)\left(\frac{n_1}{10} +\cdots + \frac{n_k}{10^k}\right)$$
But $$\left(\frac{1}{1-\frac{1}{10^k}}\right) = \sum_{j = 0}^\infty \left(\frac{1}{10^{k}}\right)^j$$ and so we'll have
 \begin{eqnarray}\frac{p}{q} &&= ( 1 + \frac{1}{10^k} + \frac{1}{(10^k)^2} + \cdots) \left(\frac{n_1}{10} +\cdots + \frac{n_k}{10^k}\right) \\ &&= \left(\frac{n_1}{10} +\cdots + \frac{n_k}{10^k}\right)  + \left(\frac{n_1}{10^{k+1}} +\cdots + \frac{n_k}{10^{2k}}\right) + \left(\frac{n_1}{10^{2k + 1}} +\cdots + \frac{n_k}{10^{3k}}\right) \cdots \end{eqnarray}
which precisely shows that $\frac{p}{q}$ is a repeating decimal.

$(^*)$ First of all, we can assume $p$ and $q$ are coprime; otherwise before trying to get their decimal values, we could simply cancel all common factors. 
When we apply the division algorithm repeatedly, we are computing that $10p \equiv r_1 \bmod(q)$, $10r_1 \equiv r_2 \bmod(q)$, $10r_2 \equiv r_3 \bmod(q)$, etc. This is the same as saying \begin{eqnarray} 10p &&\equiv r_1 \bmod(q), \\10^2p &&\equiv r_2 \bmod(q), \\10^3p &&\equiv r_3 \bmod(q), \\&&... \\10^kp &&\equiv r_k \bmod(q).\end{eqnarray} Then the claim that we reach $r_k = p$ is exactly the claim that for some $k$, $10^kp \equiv p \bmod(q)$. 
Now above I noted that the number of possible remainders $r < q$ is finite, so that eventually the repeated use of the division algorithm must give us remainders $r_j = r_k$ with $j > k$. However, we can't assume that either of these remainders is $p$ from the pigeonhole principle. 
But we can see that $r_j = r_k$ means that $10^jp \equiv 10^kp \bmod(q),$ so  $$(10^{j-k} - 1)(10^k)p \equiv 0 \bmod(q).$$ This means that necessarily we have one of two things: since $q$ is coprime to $p$, either $10^k \equiv 0 \bmod(q)$, or $10^{j-k} \equiv 1 \bmod(q)$. In this case, $10^kp = nq$ for some $k$ and $n$, so we have $\frac{p}{q} = \frac{n}{10^k}$ for $n$ which must be less than $10^k$ (since $p < q$), and now $\frac{n}{10^k}$ is precisely the decimal expansion of $\frac{p}{q}$. (In my original answer, I essentially ignored this possibility.)
The second case is the one where we actually hit a repeat remainder - if $10^{j-k} \equiv 1 \bmod(q)$, then $10^{j-k}p \equiv p \bmod(q)$, and therefore we'll have (after we do it all out with the division algorithm) $p = \frac{n_1q}{10} + \frac{n_2q}{100} + \cdots + \frac{n_{j-k}q}{10^{j-k}} + \frac{p}{10^{j-k}}.$ 
</s>