not both $2^n-1,2^n+1$ can be prime.
Solution 1:
Of the three consecutive integers $2^n-1,2^n,2^n+1$, one must be divisble by 3, and it can't be $2^n$.
Solution 2:
If $n$ is even $=2m,2^n-1=2^{2m}-1=4^m-1$ is divisible by $4-1=3$ and $4^m-1>3$ if $m\ge1\iff n\ge2$
If $n$ is odd $=2m+1,2^n+1=2^{2m+1}+1$ is divisible by $2+1=3$ and $2^{2m+1}+1>3$ if $m\ge1\iff n\ge3$
alternatively, $$(2^n-1)(2^n+1)=4^n-1$$ is divisible by $4-1=3$
So, at least one of $2^n-1,2^n+1$ is divisible by $3$
Now, $2^n+1>2^n-1>3$ for $n>2$
$\implies $ for $n>2,$ one of $2^n-1,2^n+1$ must be composite