Prove that the binary expansion of $\dfrac{1}{n}$ is periodic 
Prove that if $n > 1$ is odd, then the binary expansion of $\dfrac{1}{n}$ is periodic.

Since $n$ is odd, we know that $2$ is invertible modulo $n$. How do we continue from here?
 A: Presumably you want $n > 1$.  If $2^m \equiv 1 \mod n$, then
$$\dfrac{1}{n} = \dfrac{a}{2^m-1} = \dfrac{a}{2^m} + \dfrac{a}{2^{2m}} + \dfrac{a}{2^{3m}} + \ldots$$
for some $a$, $1 \le a < 2^m-1$.
A: If it where not periodic you have an equation of the form 
$$\frac{1}{n}=\sum_{k=1}^m \frac{a_k}{2^k}=\frac{A}{2^m}$$
Then $2^m=An$ so $n\mid 2^m$.
A: In fact, it is true that any number $x$ is rational $\iff$ it has eventually periodic (periodic from some point) expansion (in any base).
To prove your case just use the standard division algorithm (https://en.wikipedia.org/wiki/Long_division) - but in binary notation instead of decimal. If you divide $\frac{1}{n}$: you subtract $\frac{1}{2}$ (if possible), take the reminder, subtract $\frac{1}{4}$ (if possible) etc. Now observe that (i) the reminder determines the next reminder, (ii) there are only $n-1$ possible reminders.
By (ii) reminder will eventually repeat, by (i) from this point the sequence will be periodic.
What remains is to show that if $n$ is odd, the sequence will be periodic (not only $eventually$):
Since we know, that the expansion of $\frac{1}{n}$ is eventually periodic, we may subtract/add some number $d$ s.t. the result $x$ will be just periodic. $d$ represents the difference on first bits, so its binary expansion has only finitely many non-zero bits. If it has $j$ non-zero bits, we can write it as $d=\frac{i}{2^j}$ for some odd (or zero) $i$.
On the other hand we know, that  the periodic $x$ is of the form $\frac{p}{q}$ (basically this: https://en.wikipedia.org/wiki/0.999... is a reason).
Now:
$\frac{1}{n} = \frac{i}{2^j} \pm \frac{p}{q}\\
\frac{1}{n}\mp\frac{p}{q} = \frac{i}{2^j}\\
2^j \times\frac{q \mp np}{nq} = i$
Hence, as we know that $i$ cannot be even, it's 0. So $d$ is also 0. So, finally, $\frac{1}{n}$ is periodic.
A: Since $2$ is invertible $\!\!\pmod{n}$, there is some exponent $m$ such that $2^m\equiv 1\pmod{n}$, i.e. $n$ is a divisor of $2^m-1$. Since
$$ 1_2 = 0.11111111\ldots_2 = 0.\underbrace{\overline{111\ldots 111}}_{m\text{ times}} $$
the period of $\frac{1}{n}$ in base-$2$ has length $m$ and is given by the binary representation of $\frac{2^m-1}{n}$.
