Example 10. (IMO-6-1) a) Find all positive integers $n$ such that $2^{\mathrm{n}}-1$ is divisible by 7.
b) Prove that there is no positive integer $n$ such that $2^{n}+1$ is divisible by 7.
Solve $\alpha$) First note that for $k \geqslant 0, k$ an integer, $2^{3 k}-1$ is divisible by 7. Proof as follows:

Since $2^{3} \equiv 1 \pmod{7}$, it immediately follows that
$$
2^{3 k} \equiv 1 \pmod{7}, \text{ which means } 7 \mid 2^{3 k}-1 \text{. }
$$
(Or, using $2^{3 k}-1=\left(2^{3}\right)^{k}-1=\left(2^{3}-1\right)$
- $\left(2^{3 k-3}+\cdots+1\right)$, we can also deduce this.)

Thus, $2^{3 k+1}-1=2\left(2^{3 k}-1\right)+1$, $2^{3 k+2}-1=4\left(2^{3 k}-1\right)+3$ cannot be divisible by 7.
Therefore, $2^{n}-1$ is divisible by 7 if and only if $3 \mid n$.
b) Since $2^{3 k} \equiv 1 \pmod{7}$, it follows that $2^{3 k}+1 \equiv$ $2 \pmod{7}, 2^{3 k+1}+1 \equiv 3 \pmod{7}, 2^{3 k+2}+1$
$\equiv 5 \pmod{7}$. Hence, for any $n \in \mathbb{N}$, $7 \times 2^{\mathbf{n}}+1$.