TITLE: $1 = \phi(\phi(\cdots\phi(n)\cdots))$, where Euler's totient is applied $k$ times, then $n\leq 3^k$
QUESTION [11 upvotes]: Suppose that $n$ and $k$ are positive integers such that $1 = \phi(\phi(\cdots\phi(n)\cdots))$, where the Euler's totient function is repeated $k$ times. Prove that $n \leq 3^k$.

My work so far: I'm thinking of doing induction. If $\phi$ is only done once, then $n$ must be $1$ or $2$ since those are the only values when $\phi (n) = 1$. I'm not sure how to continue this induction proof, and should I also attempt a proof of contradiction?

REPLY [2 votes]: I think the following approach makes the result very intuitive.
You can define a new function $c(m)$, the number of "2" needed to construct the number $m$, in the following way: if you write $m$ as a product of primes and in every step you change every odd prime $p$ to $p-1$ in the factorization of what is left and continue this way until you get a power of 2, $2^k$ then define $c(m)=k$.
For example $c(2^k)= k$, for 3 we get $2^1$ so $c(3)=1$, for 7 we get $7 \to 2\cdot 3 \to 2^2 $ so $c(7) = 2$ for 15 we get
$$ 15=3\cdot 5 \to 2 \cdot 4 = 2^3 $$
so $c(15) = 3$, for $m=67$ you get
$$ 67 \to 2\cdot 3 \cdot 11 \to \cdot 2^3 5 \to 2^5 $$
so $c(67) = 5$, and so on.
It is immediate from the definition that
$$ c(1) = 0\quad c(2^k)=c(3^k) = k $$
and that
$$ c(nm) = c(n)+c(m) $$
and so the function is completely additive.
Now it is very easy to prove that if $c(m) = k$ then
\begin{equation} 2^k \le m \le 3^k \qquad(*)\end{equation}
Again you can proceed recursively observing that $2^k < 3^k$, $2^k \le 2^k+1 \le 3^k$ and that if $2^k \le n \le 3^k$ then
$$ 2^{k+s} \le 2^s n + 1 \le 3^{k+s} $$
and then apply this backwards to the above procedure to find $c(m)$.
Now the link with your problem is that (directly from the formula for $\phi(n)$)
$$c(\phi(m)) = \begin{cases} c(m)\quad&\text{if $m$ is odd}\\
c(m)-1 &\text{if $m$ is even}\end{cases} $$
But if $m>2$ then  $\phi(m)$ is always even so you can see that
$$c(\phi(\phi(\overset{(k}\dots \phi(m)\dots ))) = 
\begin{cases} c(m)-k+1\quad&\text{if $m$ is odd}\\
c(m)-k &\text{if $m$ is even}\end{cases}$$
And from this it follows that the least number of applications of $\phi$ to arrive from a number $m$ to 1 is :
$$ k = \begin{cases} c(m)+1\quad&\text{if $m$ is odd}\\
c(m) &\text{if $m$ is even}\end{cases}$$
And combining this with (*) you get your problem.