What is the quickest way to calculate numbers $n$ such that $x = 2^n-2$ satisfies $\phi(x)+2=\phi(x+2)$?
The list of numbers available on: https://oeis.org/A050475
What is the quickest way to calculate numbers $n$ such that $x = 2^n-2$ satisfies $\phi(x)+2=\phi(x+2)$?
The list of numbers available on: https://oeis.org/A050475
$\renewcommand{\phi}{\varphi}$In the comments of the OEIS you linked, it says that such an $n$ satisfies the equation iff $2^{n-1} - 1$ is prime, and gives a full proof of it following.
Here's the proof.
$\phi(x + 2) = \phi(2^{n}) = 2^{n} - 2^{n-1} = 2^{n-1}$.
$\phi(2^{n} - 2) + 2 = \phi(2^{n-1}-1) + 2$.
If the two are equal, then $y = 2^{n-1} - 1$ satisfies $\phi(y) = y -1$. This means all numbers $z$ with $1 \le z < y$ are coprime to $y$, so that $y$ must be a (Mersenne) prime.