5. Find all natural numbers $n$ such that $2^{n}-1$ is divisible by 7.
5. It is easy to solve this problem with the help of binary.

Because $2^{n}=(\underbrace{100 \cdots 0}_{n \uparrow 1})_{2}, 2^{n}-1=(\underbrace{111 \cdots 1}_{n \uparrow 0})_{2}$, and $7=(111)_{2}$, to make $7 \mid\left(2^{n}-1\right)$, i.e., $(111)_{2} \mid(\underbrace{111 \cdots 1}_{n \uparrow 1})_{2}$, then it is necessary that $n=3 k\left(k \in Z^{+}\right)$.