Example 1 Find all positive integers $n$ such that $2^{n}-1$ is divisible by 7.
Since $2^{n}=(\underbrace{100 \cdots 0}_{n \uparrow})_{2}$, then $2^{n}-1=(\underbrace{11 \cdots 1}_{n \uparrow})_{2}$. And $7=(111)_{2}$, therefore, for $7 \mid\left(2^{n}-1\right)$, i.e., $(111)_{2} \mid(\underbrace{11 \cdots 1}_{n \uparrow})_{2}$, $n$ must be a multiple of 3.