Introduction to BEAF

BEAF, or Bowers Exploding Array Function, is a googological function invented by Jonathan Bowers.

3 entry array
Before we can understand BEAF, we must understand the extended operators at its core. Arrow notation describes a set of operators invented by Donald Knuth:


 * $$a\uparrow b = a^b$$.
 * $$a\uparrow\uparrow b = \underbrace{a\uparrow a\uparrow\ldots\uparrow a\uparrow a}_b = \underbrace{a^{a^{a^{.^{.^.}}}}}_b$$. Googologists call this tetration; arrows should be solved from right to left.
 * $$a\uparrow\uparrow\uparrow b = \underbrace{a\uparrow\uparrow a\uparrow\uparrow\ldots\uparrow\uparrow a\uparrow\uparrow a}_b$$. Also known as pentation.

In general,
 * $$a\uparrow^n b = \underbrace{a\uparrow^{n-1} a\uparrow^{n-1}\ldots\uparrow^{n-1} a\uparrow^{n-1} a}_b$$.

Here are some examples:


 * $$3\uparrow 4 = 3^4 = 81$$ (3 to the power of 4)
 * $$2\uparrow\uparrow 4 = 2\uparrow 2\uparrow 2\uparrow 2 = 2\uparrow 2\uparrow 4 = 2\uparrow 16 = 65536$$ (2 tetrated to 4))
 * $$4\uparrow\uparrow 4 = 2187879733...5261392896$$; about $$8.0723\cdot 10^{153}$$ digits (4 tetrated to 4)
 * $$3\uparrow\uparrow\uparrow 3 = 3\uparrow\uparrow 3\uparrow\uparrow 3 = 3\uparrow\uparrow 3^{3^3} = 3\uparrow\uparrow 7625597484987$$ (3 pentated to 3)

Note that $$a\uparrow^n b$$ is pronounced "a (n + 2)-ated to b," not "a n-ated to b."

Operator notation
Bowers developed a generalization of arrow notation that he calls operator notation:


 * $$a\ \{n\}\ b = a\uparrow^n b$$
 * i.e.: $$a\ \{1\}\ b = a^b$$
 * and $$a\ \{n\}\ b = \underbrace{a\ \{n - 1\}\ a\ \{n - 1\}\ \ldots\ \{n - 1\}\ a\ \{n - 1\}\ a}_b$$

For example, $$3\ \{4\}\ 5 = 3\uparrow\uparrow\uparrow\uparrow 5$$.

This form of operator notation is simply a shorthand for arrow notation. However, Bowers takes it a step further by wrapping n in two pairs of braces instead of one:


 * $$a\ \{\{1\}\}\ b = \underbrace{a\ \{a\ \{\ldots a\ \{a\}\ a\ldots\}\ a\}\ a}_b$$

Bowers calls this a expanded to b. Here, b is the number of "layers" including the outside, or (number of a 's + 1)/2.

An example:


 * $$3\ \{\{1\}\}\ 3 = 3\ \{3\ \{3\}\ 3\}\ 3 = 3\ \{3\ \{2\}\ 7625597484987\}\ 3$$

If we change n to 2, we get multiexpansion.
 * $$a\ \{\{2\}\}\ b = \underbrace{a\ \{\{1\}\}\ a\ \{\{1\}\}\ \ldots\ \{\{1\}\}\ a\ \{\{1\}\}\ a}_b$$

Higher values for n can be used:
 * $$a\ \{\{3\}\}\ b = \underbrace{a\ \{\{2\}\}\ a\ \{\{2\}\}\ \ldots\ \{\{2\}\}\ a\ \{\{2\}\}\ a}_b$$ (powerexpansion)
 * $$a\ \{\{4\}\}\ b = \underbrace{a\ \{\{3\}\}\ a\ \{\{3\}\}\ \ldots\ \{\{3\}\}\ a\ \{\{3\}\}\ a}_b$$ (expandotetration)
 * expandopentation, expandohexation, etc.

Using three braces instead of two gives us explosion:


 * $$a\ \{\{\{1\}\}\}\ b = \underbrace{a\ \{\{a\ \{\{\ldots a\ \{\{a\}\}\ a\ldots\}\}\ a\}\}\ a}_b$$
 * $$a\ \{\{\{2\}\}\}\ b = \underbrace{a\ \{\{\{1\}\}\}\ a\ \{\{\{1\}\}\}\ \ldots\ \{\{\{1\}\}\}\ a\ \{\{\{1\}\}\}\ a}_b$$ (multiexplosion)
 * $$a\ \{\{\{3\}\}\}\ b = \underbrace{a\ \{\{\{2\}\}\}\ a\ \{\{\{2\}\}\}\ \ldots\ \{\{\{2\}\}\}\ a\ \{\{\{2\}\}\}\ a}_b$$ (powerexplosion)
 * $$a\ \{\{\{4\}\}\}\ b = \underbrace{a\ \{\{\{3\}\}\}\ a\ \{\{\{3\}\}\}\ \ldots\ \{\{\{3\}\}\}\ a\ \{\{\{3\}\}\}\ a}_b$$ (explodotetration)
 * explodopentation, explodohexation, etc.

Four sets of braces is detonation (multidetonation, powerdetonation, detonotetration, etc.), and five is pentonation (multipentonation, powerpentonation, pentonotetration, etc.) Then we have hexonation, heptonation, etc.

Our operator notation now has four arguments:


 * $$a\ \{1\}\ b = a^b$$
 * $$a\ \{1\}^d\ b = \underbrace{a\ \{a\ \{\ldots a\ \{a\}^{d - 1}\ a\ldots\}^{d - 1}\ a\}^{d - 1}\ a}_b$$
 * $$a\ \{c\}^d\ b = \underbrace{a\ \{c - 1\}^d\ a\ \{c - 1\}^d\ \ldots\ \{c - 1\}^d\ a\ \{c - 1\}^d\ a}_b$$

Here, the superscript d 's indicate the number of curly braces wrapped around c. For example, $$\{\ldots\}^4$$ is a shorthand for $$\{\{\{\{\ldots\}\}\}\}$$. This particular notation was not used by Jonathan Bowers.

Array Notation
Operator notation is starting to burst at the seams. A simpler way to write $$a\ \{c\}^d\ b$$ is $$\{a, b, c, d\}$$. Our new notation is:


 * 1) $$\{a, b, 1, 1\} = a^b$$
 * 2) $$\{a, b, 1, d\} = \underbrace{\{a, a, \{a, a, \ldots \{a, a, a, d - 1\} \ldots, d - 1\}, d - 1\}}_b$$ if $$d > 1$$
 * 3) $$\{a, b, c, d\} = \underbrace{\{a, \{a, \ldots \{a, a, c - 1, d\} \ldots, c - 1, d\}, c - 1, d\}}_b$$ if $$c > 1$$

Ones are considered defaults, so we can chop off the end of an array if it consists only of ones. For example, $$\{a, b, 1, 1\}$$ can just be written $$\{a, b\}$$.

This system is called Array Notation. Eventually, we will extend it to an arbitrary number of entries.

We can simplify rules 2 and 3 somewhat by relying on their recursive nature:


 * $$\{a, b, 1, d\} = \underbrace{\{a, a, \{a, a, \ldots \{a, a, a, d - 1\} \ldots, d - 1\}, d - 1\}}_b$$
 * $$= \{a, a, \underbrace{\{a, a, \ldots \{a, a, a, d - 1\} \ldots, d - 1\}}_{b - 1}, d - 1\} = \{a, a, \{a, b - 1, c, d\}, d - 1\}$$


 * $$\{a, b, c, d\} = \underbrace{\{a, \{a, \ldots \{a, a, c - 1, d\} \ldots, c - 1, d\}, c - 1, d\}}_b$$
 * $$= \{a, \underbrace{\{a, \ldots \{a, a, c - 1, d\} \ldots, c - 1, d\}}_{b - 1}, c - 1, d\} = \{a, \{a, b - 1, c, d\}, c - 1, d\}$$

Extending to five entries
We note that in the case $$\{a, b, c, d\}$$, rule 3 above, d is left untouched in the calculation. Indeed, we can keep calculating the array and d will never change until c = 1 and rule 2 applies.

Here is the current rule 3:


 * $$\{a, b, c, d\} = \{a, \{a, b - 1, c, d\}, c - 1, d\}$$ if $$c > 1$$

Using this rule and the observation above, we shall introduce a fifth argument to the array, e:


 * $$\{a, b, c, d, e\} = \{a, \{a, b - 1, c, d, e\}, c - 1, d, e\}$$ if $$c > 1$$