Problem: Find all positive integers $n$ such that $\varphi(\sigma(2^n)) = 2^n$, where $\varphi(n)$ is Euler's totient function and $\sigma(n)$ is the sum of all divisors of $n$.
I know that $\sigma(2^n) = 1+2+2^2+2^3+\dots+2^n = 2^{n+1}-1$, so we only need to find all $n$ such that $\varphi(2^{n+1}-1) = 2^n$. Trying out a few $n$, we find that $n=1,3,7,15,31$ work. Not sure how to prove this though. Any answers?
This problem beautifully connects Mersenne numbers to Fermat numbers.
@RossMillikan hints that $n=2^k-1$ is special. By noting $\prod_{j=0}^{k-1}(2^{2^j}+1)$ is a product of coprime Fermat numbers, you can prove $\varphi(2^{2^k}-1)=2^{2^k-1}$, provided those Fermat numbers are prime.
Now for the converse. If $\varphi(2^{n+1}-1)$ is a power of two, so is $\varphi(p)$ for each prime factor $p$ of $2^{n+1}-1$, so such primes are $1$ more than a power of $2$, i.e. are Fermat primes. Note $\prod_{j\ge1}(1+2^{-2^j})=\frac43$ by the above telescoping logic. So while a product of Fermat numbers exceeds the product of the powers of $2$ below them, the closest it can get to the next power of $2$ is to be $1$ less than it, by using all Fermat numbers up to a certain point, giving us the previous case.