TITLE: When does $(\phi(n)-1)\mid (n-2)$.
QUESTION [5 upvotes]: Find all integers $n>2\in\mathbb{N}$ such that $(\phi(n)-1)\mid (n-2)$. Did some manipulation i saw that $n=6,2^{k}$ or a prime. But i am not sure how to prove or disprove this. Of course here $\phi(N)$ is the Euler's totient function.

REPLY [3 votes]: Having searched for $n < 10^7$ by mathematica, I found that your assertion failed when $n=30, 510, 131070$. Those $n$s can be rewritten as $2^{2^k+1}-2$, or products of Fermat numbers and $2$.
$$
30=2^5-2=2 \cdot 3 \cdot 5\\
510=2^9-2=2 \cdot 3 \cdot 5 \cdot 17\\
131070=2^{17}-2=2 \cdot 3 \cdot 5 \cdot 17 \cdot 257
$$
Of course $n=2^{33}-2$ also satisfy your criterion and $2^{65}-2$ does not.