Task B-4.5. Determine all natural numbers $n$ for which $2^{n}-1$ and $2^{n}+1$ are simultaneously prime numbers.
## Solution.

For $n=1$ we have $2^{n}-1=1$ and $2^{n}+1=3$, so $n=1$ is not a solution because 1 is not a prime number. (1 point)

For $n=2$ we have $2^{n}-1=3$ and $2^{n}+1=5$.

(1 point)

Let $n>2$. Then the numbers $2^{n}-1, 2^{n}, 2^{n}+1$ are three consecutive natural numbers, one of which is certainly divisible by 3.

(2 points)

Since the number $2^{n}$ is not divisible by 3, one of the numbers $2^{n}-1, 2^{n}+1$ must be divisible by 3, which means that they cannot both be prime.

(1 point)

Therefore, the only solution is $n=2$.

(1 point)