I have this formula $\underbrace{2^{2^{2^{.^{.^{.^{2^2}}}}}}}_n$i.e. where the total number of 2's is $n$.
Is there any way to write it as a single mathematical function?
I have this formula $\underbrace{2^{2^{2^{.^{.^{.^{2^2}}}}}}}_n$i.e. where the total number of 2's is $n$.
Is there any way to write it as a single mathematical function?
Knuth invented a notation for these kinds of expressions, called "up-arrow notation".
To express the power tower in your question with up-arrow notation, we can simply write $2\uparrow\uparrow n$.
Yes, using Knuth's up-arrow notation. In your case, $2\uparrow\uparrow n$.
According to this definition you can define this number as :
$^n2 = \begin{cases} 1, & \text{if }n=0 \\ 2^{[^{n-1}2]}, & \text{if }n>0 \end{cases}$