Problem

Source: India Postal Set 1 P1 2016

Tags: number theory



Let $n$ be an odd positive integer such that $\varphi (n)$ and $\varphi (n+1)$ are both powers of $2$ (here $\varphi(n)$ denotes Euler’s totient function). Prove that $n+1$ is a power of $2$ or $n = 5$.