0
$\begingroup$

Find all $n\in \mathbb N$ such that $2^n+1$ and $2^n-1$ are both primes .

My Attempt:

let $p=2^n+1$ and $q=2^n-1$

I will start with a claim.

claim: $n=2\implies p=5, q=3$ is the only solution, because otherwise $2^n+1$ or $2^n-1$ would be divisible by $5$ or $3$.

if $3\mid 2^n+1\iff 2^n+1\equiv 0 \pmod 3 \implies 2^{n-1}\equiv 1 \pmod 3$.

But i don't know how to prove this claim.

$\endgroup$
2
6
$\begingroup$

You are kinda on the right track. Note that one of $2^n-1, 2^n, 2^n+1$ is divisible by $3$, and one of them is never divisible by $3$. Hence if $2^n-1 > 3$, one of $2^n-1, 2^n+1$ is composite.

$\endgroup$
4
  • $\begingroup$ How did you know that one of them is divisible by $3$ $\endgroup$ – Yassir Feb 28 at 13:52
  • $\begingroup$ They are three consecutive numbers. $\endgroup$ – player3236 Feb 28 at 13:54
  • $\begingroup$ $2\equiv (-1)\pmod 3 \implies 2^n\equiv (-1)^n\pmod 3 $ Then either $$\cases{2^n-1\equiv 0\pmod 3 \\ 2^n+1\equiv 0 \pmod 3}$$ Am i right? $\endgroup$ – Yassir Feb 28 at 13:57
  • $\begingroup$ That is correct, so which of $2^n\pm1$ is divisible by $3$ depends on whether $n$ is odd or even. $\endgroup$ – player3236 Feb 28 at 14:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.