Tetration

Tetration, also known as hyper4, superpower, superdegree or powerlog, is a binary mathematical operator defined as \(^yx = x^{x^{x^{.^{.^.}}}}\) with \(y\) copies of \(x\). In other words, tetration is repeated exponentiation. Formally, this is

\[^0x = 1\]

\[^{n + 1}x = x^{^nx}\]

where \(n\) is a nonnegative integer.

Daniel Geisler has created a website, tetration.org, dedicated to the operator and its properties.

Basis
Multiplication is defined as repeated addition:


 * \[x \times y = \underbrace{x + x + \ldots + x + x}_y\]

Exponentiation is defined as repeated multiplication:


 * \[x^y = \underbrace{x \times x \times \ldots \times x \times x}_y\]

Analogously, tetration is defined as repeated exponentiation:


 * \[^yx = \underbrace{x^{x^{x^{.^{.^.}}}}}_y\]

\(^yx\) is pronounced "to-the-\(y\) \(x\)" or "\(x\) tetrated to \(y\)." The notation is due to Rudy Rucker; another popular notation is \(x^④y\). \(^yx\) is equivalent to \(x \uparrow\uparrow y\) in Arrow Notation or \(\{x,y,2\}\) in BEAF.

Tetration also can be written in chained arrow notation as \(a \rightarrow b \rightarrow 2\) and in Hyper-E notation as \(E(a)\#1\#b\).

But since exponentiation is not an associative operator (that is, \(a^{b^c}\) is generally not equal to \(\left(a^b\right)^c = a^{bc}\)), we can also group the exponentiation from bottom to top, producing what Robert Munafo calls the hyper4 operator, written \(x_④y\). \(x_④y\) reduces to \(x^{x^{y - 1}}\), which is not as mathematically interesting as the usual tetration.

Properties
Tetration lacks many of the symmetrical properties of the lower hyper-operators, so it is difficult to manipulate algebraically.

Power identity
It is possible to show that \({^ba}^{^ca} = {^{c+1}a}^{^{b-1}a}\). For example, \({^42}^{^22} = {^32}^{^32} = 2^{64}\).

Proof
\[{^ba}^{^ca} = (a^{^{b - 1}a})^{(^ca)} = a^{^{b - 1}a \cdot {}^ca} = a^{^ca \cdot {}^{b - 1}a} = (a^{^ca})^{^{b - 1}a} = {^{c + 1}a}^{^{b - 1}a}\]

Tetration \(^ba\) has exponent \(^{b-1}a\). (1)

\({(a^b)}^c = a^{b \times c}.\) (2)

Consider the power tower \({^3a}^{^3a} = (a^{a^a})^{(a^{a^a})}\). We take exponent of the lower power tower \(({^2a})\) and multiply it by upper power tower, then it becomes exponent of a (it follows from the statement (2)): \(a^{a^a \times a^{a^a}} = (a^{a^{a^a}})^{a^a} = {^4a}^{^2a}\).

In arbitrary-height power towers: \((a^{a^{a^{...^{a^a}}}})^{(a^{a^{a^{...^{a^a}}}})}\) (b a's in lower power tower, c a's in upper power tower) \( = a^{a^{a^{a^{...^{a^a}}}} \times a^{a^{...^{a^a}}}} = (a^{a^{a^{a^{...^{a^a}}}}})^{(a^{a^{...^{a^a}}})} = {^{c+1}a}^{^{b-1}a}\).

Expansion
Mathematicians have not agreed on the function's behavior on \(^yx\) where y is not an integer.

One function of note is infinite tetration, defined as \[^\infty x = \lim_{n\rightarrow\infty}{}^nx\]

If we mark the points on the complex plane at which \(^\infty x\) becomes periodic (as opposed to escaping to infinity), we get an interesting fractal. Daniel Geisler studied this shape extensively, giving names to identifiable features.

Examples
Here are some small examples of tetration in action:


 * \(^22 = 2^2 = 4\)
 * \(^32 = 2^{2^2} = 2^4 = 16\)
 * \(^23 = 3^3 = 27\)
 * \(^33 = 3^{3^3} = 3^{27} = 7625597484987\)
 * \(^42 = 2^{2^{2^2}} = 2^{2^4} = 2^{16} = 65536\)
 * \(^2{-2} = (-2)^{(-2)} = \frac{1}{(-2)^2} = \frac{1}{4}\)
 * \(^3{-2} = (-2)^{(-2)^{(-2)}} = (-2)^{1/4} = \frac{1 + i}{\sqrt[4]{2}}\)
 * \(^2(1/2) = (1/2)^{(1/2)} = \sqrt{1/2} = \frac{\sqrt2}{2}\)
 * \(^3(1/2) = (1/2)^{(1/2)^{(1/2)}} = (1/2)^{\sqrt{2}/2}\)

Here are some larger examples:


 * \(^35 = 5^{5^5} \approx 1.9110125979 \cdot 10^{2184}\)
 * \(^310 = 10^{10^{10}} = 10^{10000000000}\)
 * \(^43 \approx 10^{10^{10^{1.11}}}\)

Last digits convergence
If we have a power tower with n terms high, based on integer number, then it when solved has n-1 digits that occurs in the higher power towers at the same base. It is helpful allows you to find the last digits of Graham's number, tritri, supertet, and other large numbers which is the power tower with gigantic number of terms itself.

Pseudocode
Below is an example of pseudocode for tetration.

function tetration(a, b): result := 1 repeat b times: result := a to the power of result return result