Smallest $k$ such that $\phi(\phi(\phi(…_k(\phi(n)))))=1$

abstract-algebraprime numberssequences-and-seriestotient-functionupper-lower-bounds

Let $\phi$ be Euler's totient function and $n$ be a positive integer. Let $\phi^k(n)$ denote $k$ sucessive applications of the totient function.

Since $\phi(n)<n$ for all $n\geq 2$, we know that $\exists k|\phi^k(n)=1$ and we can pick a minimal such $k$.

Question Are there known asymptotic upper bounds on this better than the trivial $k<n$?


We know that $\phi(n)=n-1$ if $n$ is prime. Trivially, $k<n$.

However this upper bound becomes stronger when one accounts for composite numbers: for example, $\phi(n)\leq n-n^{1/2}$ if $n$ has at least $2$ distinct factors. Can we do better than $k<n$?

Best Answer

$\phi(2m)\leq m,$ and $\phi(n)$ is even except when $\phi(n)=1.$ So you get $k\leq 1+\log_2(n-1).$

This upper bound can be achieved when $n=2^{2^j}+1$ is a Fermat prime. There might only be finitely man such $n,$ but we can’t do much better for large $n,$ since when $n=2^m,$ $k=m=\log_2(n).$ Indeed, $\lfloor 1+\log_2(2^m-1)\rfloor =m,$ so this is a maximum again.