For a natural number $n$, the digital root of $n$ is the value obtained by an iterative process of summing digits. The digital root of $n$ is denoted by $d(n)$.
Examples; $d(142)=7$, $d(123785)=8$
In $2013$, I attended a hard mathematical tournament. In this tournament, no one answered this question, and I am curious to know the key of solving it. Any help will be appreciated.
If $d(n)=n-9\left \lfloor \frac{n-1}{9} \right \rfloor$, find the value of $d(\underset{\text{The number of }2 \text{'s is }2013}{\underbrace{2^{2^{2^{.^{.^{.^{2}}}}}}}})$.
I have found a suspiciously simple answer to this problem, so I would appreciate it if you could check my work. Let us define $\textrm{tow}(2, k)$ to indicate a power tower of $2$s of height $k$. We know that $2^6 \equiv 1 \mod 9$. Thus, $\textrm{tow}(2, 2013) \equiv 2^{a}\mod 9$, where $a \equiv \textrm{tow}(2, 2012) \mod 6$. However, note that $2^{2k} \equiv 4 \mod 6$ when $k>0$. $\textrm{tow}(2, 2012)$ is obviously even, so it follows that $\textrm{tow}(2, 2013) \equiv 2^{4}\equiv 7\mod 9$. Using the formula for $d(n)$ that you provided, we see that our final answer is indeed just $7$.