Definitions

# Knuth's up-arrow notation

In mathematics, Knuth's up-arrow notation is a method of notation of very large integers introduced by Donald Knuth in 1976. It is closely related to the Ackermann function. The idea is based on iterated exponentiation in much the same way that exponentiation can be similar to iterated multiplication, and multiplication can be similar to iterated addition.

## Introduction

Multiplication by a natural number can be defined as iterated addition:


begin{matrix} atimes b & = & underbrace{a+a+dots+a} & & bmbox{ copies of }a end{matrix} .

For example,


begin{matrix} 3times 2 & = & underbrace{3+3} & = & 6 & & 2mbox{ copies of }3 end{matrix} .

Exponentiation for a natural power $b$ can be defined as iterated multiplication:


begin{matrix} auparrow b= a^b = & underbrace{atimes atimesdotstimes a} & bmbox{ copies of }a end{matrix} .

For example,


begin{matrix} 3uparrow 2= 3^2 = & underbrace{3times 3} & = & 9 & 2mbox{ copies of }3 end{matrix} .

This inspired Knuth to define a “double arrow” operator for iterated exponentiation or tetration:


begin{matrix} auparrowuparrow b & = { ^{b}a} = & underbrace{a^{a^{{}^{.,^{.,^{.,^a}}}}}} & = & underbrace{auparrow auparrowdotsuparrow a} & & bmbox{ copies of }a & & bmbox{ copies of }a end{matrix}

For example,


begin{matrix} 3uparrowuparrow 2 & = { ^{2}3} = & underbrace{3^3} & = & underbrace{3uparrow 3} & = & 27 & & 2mbox{ copies of }3 & & 2mbox{ copies of }3 end{matrix} .

Here and below evaluation is to take place from right to left (as such the operation is right-associative):

According to this definition,

$3uparrowuparrow2=3^3=27$
$3uparrowuparrow3=3^\left\{3^3\right\}=3^\left\{27\right\}=7625597484987$
$3uparrowuparrow4=3^\left\{3^\left\{3^3\right\}\right\}=3^\left\{7625597484987\right\}$ (just writing out this number in expanded form would require about 1.37 terabytes of storage space, i. e. $7,625,597,484,987 times frac\left\{log 3\right\}\left\{log 2\right\}$ bits)
$3uparrowuparrow5=3^\left\{3^\left\{3^\left\{3^3\right\}\right\}\right\} = 3^\left\{3^\left\{7625597484987\right\}\right\}$
etc.

This already leads to some fairly large numbers, but Knuth extended the notation. He went on to define a “triple arrow” operator for iterated application of the “double arrow” operator (also known as pentation):


begin{matrix}
`  auparrowuparrowuparrow b= &`
underbrace{a_{}uparrowuparrow auparrowuparrowdotsuparrowuparrow a} & bmbox{ copies of }a end{matrix}

followed by a 'quad arrow' operator:


begin{matrix}
`  auparrowuparrowuparrowuparrow b= &`
underbrace{a_{}uparrowuparrowuparrow auparrowuparrowuparrowdotsuparrowuparrowuparrow a} & bmbox{ copies of }a end{matrix}

and so on. The general rule is that an $n$-arrow operator expands into a series of ($n - 1$)-arrow operators. Symbolically,


begin{matrix} a underbrace{uparrow_{}uparrow!!dots!!uparrow} b= a underbrace{uparrow!!dots!!uparrow} a underbrace{uparrow_{}!!dots!!uparrow}
`    a dots`
a underbrace{uparrow_{}!!dots!!uparrow}
`    a`
` `
` `

Examples:

$3uparrowuparrowuparrow2 = 3uparrowuparrow3 = 3^\left\{3^3\right\} = 3^\left\{27\right\}=7,625,597,484,987$

$begin\left\{matrix\right\}$

`   3uparrowuparrowuparrow3 = 3uparrowuparrow3uparrowuparrow3 = 3uparrowuparrow(3uparrow3uparrow3) = &`
underbrace{3_{}uparrow 3uparrowdotsuparrow 3} & 3uparrow3uparrow3mbox{ copies of }3 end{matrix} begin{matrix} = & underbrace{3_{}uparrow 3uparrowdotsuparrow 3} & mbox{7,625,597,484,987 copies of 3} end{matrix}

## Notation

In expressions such as $a^b$, the notation for exponentiation is usually to write the exponent $b$ as a superscript to the base number $a$. But many environments — such as programming languages and plain-text e-mail — do not support such two-dimensional layout. People have adopted the linear notation $a uparrow b$ for such environments; the up-arrow suggests 'raising to the power of'. If the character set doesn't contain an up arrow, the caret ^ is used instead.

The superscript notation $a^b$ doesn't lend itself well for generalization, which explains why Knuth chose to work from the inline notation $a uparrow b$ instead.

In the context of the C programming language, the ^ character is the XOR operator. ** is a common alternative to $uparrow$ for discussion in this context, using the same principle of two symbols meaning repetition of that operator. It is possible that *** could be equivalent to $uparrowuparrow$, but this usage is uncommon.

### Writing out up-arrow notation in terms of powers

Attempting to write $a uparrow uparrow b$ using the familiar superscript notation gives a power tower. With b too large to write b numbers a, this requires using dots and a brace with the number b next to it, indicating the height of the power tower. $a uparrow uparrow uparrow b$ requires a row of such power towers, separated by braces: there are b power towers, including the last with height 1, hence simply the number a. If b is too large to write all these power towers, we use dots to indicate a row of them, and for the number of power towers a "cross-brace" (the number of braces is one less). $a uparrow uparrow uparrow uparrow b$ requires a row of such rows of power towers; there are b rows of power towers, including the last, which consists of only one "power tower" of height 1, so is simply the number a. If b is too large to write all these rows, we use a "cross-cross-brace" with this number b next to it (the number of cross-braces is one less). And so on.

Since the power notation is in direction "/", the braces are too. A row of them could be written in perpendicular direction "", and the cross-brace too. A row of cross-braces could then extend in the direction "/", with a cross-cross-brace too, etc.

Example:

• For 4$uparrowuparrowuparrow$6 there are six power towers, including the last with height 1, hence simply the number 4; writing out the fifth power tower we have only five:

$begin\left\{matrix\right\} underbrace\left\{begin\left\{matrix\right\} underbrace\left\{4^\left\{4^\left\{4^\left\{.^\left\{.^\left\{.\left\{4\right\}\right\}\right\}\right\}\right\}\right\}\right\} underbrace\left\{4^\left\{4^\left\{4^\left\{.^\left\{.^\left\{.\left\{4\right\}\right\}\right\}\right\}\right\}\right\}\right\} underbrace\left\{4^\left\{4^\left\{4^\left\{.^\left\{.^\left\{.\left\{4\right\}\right\}\right\}\right\}\right\}\right\}\right\} \left\{4^\left\{4^\left\{4^\left\{.^\left\{.^\left\{.\left\{4\right\}\right\}\right\}\right\}\right\}\right\}\right\} end\left\{matrix\right\}\right\} \left\{4^\left\{4^\left\{4^\left\{4\right\}\right\}\right\}\right\} end\left\{matrix\right\}$

Using the left-superscript notation for tetration we have one "level of braces" less: $a uparrow uparrow uparrow b$ requires a "tetration tower" in the direction "", and a brace with the number b next to it, indicating the height of the tetration tower. $a uparrow uparrow uparrow uparrow b$ requires a row of such tetration towers, separated by braces: there are b tetration towers, including the last with height 1, hence simply the number a. If b is too large to write all these tetration towers, we use a "cross-brace" with this number b next to it. And so on.

Examples:

• The previous example becomes

$^\left\{^\left\{^\left\{^\left\{^\left\{4\right\}4\right\}4\right\}4\right\}4\right\}4$

• For the fourth Ackermann number $4 uparrow uparrow uparrow uparrow 4$ there are four tetration towers, including the last with height 1, hence simply the number 4; writing out the third tetration tower we have only three:

$begin\left\{matrix\right\} underbrace\left\{begin\left\{matrix\right\} underbrace\left\{^\left\{^\left\{^\left\{^\left\{^\left\{^\left\{^\left\{4\right\}.\right\}.\right\}.\right\}4\right\}4\right\}4\right\}4\right\} ^\left\{^\left\{^\left\{^\left\{^\left\{^\left\{^\left\{4\right\}.\right\}.\right\}.\right\}4\right\}4\right\}4\right\}4 end\left\{matrix\right\}\right\} ^\left\{^\left\{^\left\{^4\right\}4\right\}4\right\}4 end\left\{matrix\right\}$

## Generalizations

Some numbers are so large that multiple arrows of Knuth's up-arrow notation become too cumbersome; then an n-arrow operator $uparrow^n$ is useful (and also for descriptions with a variable number of arrows), or equivalently, hyper operators.

Some numbers are so large that even that notation is not sufficient. Graham's number is an example. The Conway chained arrow notation can then be used: a chain of three elements is equivalent with the other notations, but a chain of four or more is even more powerful.


begin{matrix} auparrow^n b & = & mbox{hyper}(a,n+2,b) & = & ato bto n mbox{(Knuth)} & & & & mbox{(Conway)} end{matrix}

It is generally suggested that Knuth's arrow should be used for relatively smaller magnitude numbers, and the chained arrow or hyper operators for larger ones.

## Definition

The up-arrow notation is formally defined by


` auparrow^n b=`
` left{`
begin{matrix} a^b, & mbox{if }n=1; 1, & mbox{if }b=0; auparrow^{n-1}(auparrow^n(b-1)), & mbox{otherwise} end{matrix}
` right.`

for all integers $a, b, n$ with $b ge 0, n ge 1$.

All up-arrow operators (including normal exponentiation, $a uparrow b$) are right associative, i.e. evaluation is to take place from right to left in an expression that contains two or more such operators. For example, $a uparrow b uparrow c = a uparrow \left(b uparrow c\right)$, not $\left(a uparrow b\right) uparrow c$; for example
$3uparrowuparrow 3=3^\left\{3^3\right\}$ is $3^\left\{\left(3^3\right)\right\}=3^\left\{27\right\}=7625597484987$ not $left\left(3^3right\right)^3=27^3=19683.$

There is good reason for the choice of this right-to-left order of evaluation. If we used left-to-right evaluation, then $a uparrowuparrow b$ would equal $a uparrow \left(a uparrow \left(b - 1\right)\right)$, so that $uparrowuparrow$ would not be an essentially new operation. Right associativity is also natural because we can rewrite the iterated arrow expression $auparrow^ncdotsuparrow^na$ that appears in the expansion of $a uparrow^\left\{n + 1\right\}b$ as $auparrow^ncdotsuparrow^nauparrow^n1$, so that all the $a$s appear as left operands of arrow operators. This is significant since the arrow operators are not commutative.

Writing $\left(auparrow ^m\right)^b$ for the bth functional power of the function $f\left(n\right)=auparrow ^m n$ we have $auparrow ^n b = \left(auparrow ^\left\{n-1\right\}\right)^b 1$.

The definition could be extrapolated one step, starting with $auparrow^n b= ab$ if n = 0, because exponentiation is repeated multiplication starting with 1. Extrapolating one step more, writing multiplication as repeated addition, is not as straightforward because multiplication is repeated addition starting with 0 instead of 1. "Extrapolating" again one step more, writing addition of n as repeated addition of 1, requires starting with the number a. Compare the , where the starting values for addition and multiplication are also separately specified.

## Tables of values

Computing $2uparrow^m n$ can be restated in terms of an infinite table. We place the numbers 2 $n$ in the top row, and fill the left column with values 2. To determine a number in the table, take the number immediately to the left, then look up the required number in the previous row, at the position given by the number just taken.

Values of $2uparrow^m n$ = hyper(2, m + 2, n) = 2 → n → m
mn 1 2 3 4 5 6 7 formula
0 2 4 6 8 10 12 14 $2n$
1 2 4 8 16 32 64 128 $2^n$
2 2 4 16 65536 $2^\left\{65536\right\}approx 2.0 times 10^\left\{19,729\right\}$ $2^\left\{2^\left\{65536\right\}\right\}approx 10^\left\{6.0 times 10^\left\{19,728\right\}\right\}$ $2^\left\{2^\left\{2^\left\{65536\right\}\right\}\right\}approx 10^\left\{10^\left\{6.0 times 10^\left\{19,728\right\}\right\}\right\}$ $2uparrowuparrow n$
3 2 4 65536 $begin\left\{matrix\right\} underbrace\left\{2_\left\{\right\}^\left\{2^\left\{\left\{\right\}^\left\{.,^\left\{.,^\left\{.,^2\right\}\right\}\right\}\right\}\right\}\right\} 65536mbox\left\{ copies of \right\}2 end\left\{matrix\right\}approx \left(10uparrow\right)^\left\{65531\right\}\left(6.0 times 10^\left\{19,728\right\}\right)$       $2uparrowuparrowuparrow n$
4 2 4 $begin\left\{matrix\right\} underbrace\left\{2_\left\{\right\}^\left\{2^\left\{\left\{\right\}^\left\{.,^\left\{.,^\left\{.,^2\right\}\right\}\right\}\right\}\right\}\right\} 65536mbox\left\{ copies of \right\}2 end\left\{matrix\right\}$         $2uparrowuparrowuparrowuparrow n$

Note: $\left(10uparrow\right)^k$ denotes a functional power of the function $f\left(n\right)=10^n$ (the function also expressed by the suffix -plex as in googolplex).

The table is the same as that of the Ackermann function, except for a shift in $m$ and $n$, and an addition of 3 to all values.

Computing $3uparrow^m n$

We place the numbers 3 $n$ in the top row, and fill the left column with values 3. To determine a number in the table, take the number immediately to the left, then look up the required number in the previous row, at the position given by the number just taken.

Values of $3uparrow^m n$ = hyper(3, m + 2, n) = 3 → n → m
mn 1 2 3 4 5 formula
0 3 6 9 12 15 $3n$
1 3 9 27 81 243 $3^n$
2 3 27 7,625,597,484,987 $3^\left\{7,625,597,484,987\right\}$   $3uparrowuparrow n$
3 3 7,625,597,484,987 $begin\left\{matrix\right\} underbrace\left\{3_\left\{\right\}^\left\{3^\left\{\left\{\right\}^\left\{.,^\left\{.,^\left\{.,^3\right\}\right\}\right\}\right\}\right\}\right\} 7,625,597,484,987mbox\left\{ copies of \right\}3 end\left\{matrix\right\}$     $3uparrowuparrowuparrow n$
4 3 $begin\left\{matrix\right\} underbrace\left\{3_\left\{\right\}^\left\{3^\left\{\left\{\right\}^\left\{.,^\left\{.,^\left\{.,^3\right\}\right\}\right\}\right\}\right\}\right\} 7,625,597,484,987mbox\left\{ copies of \right\}3 end\left\{matrix\right\}$       $3uparrowuparrowuparrowuparrow n$

Computing $10uparrow^m n$

We place the numbers 10 $n$ in the top row, and fill the left column with values 10. To determine a number in the table, take the number immediately to the left, then look up the required number in the previous row, at the position given by the number just taken.

Values of $10uparrow^m n$ = hyper(10, m + 2, n) = 10 → n → m
mn 1 2 3 4 5 formula
0 10 20 30 40 50 $10n$
1 10 100 1,000 10,000 100,000 $10^n$
2 10 10,000,000,000 $10^\left\{10,000,000,000\right\}$ $10^\left\{10^\left\{10,000,000,000\right\}\right\}$ $10^\left\{10^\left\{10^\left\{10,000,000,000\right\}\right\}\right\}$ $10uparrowuparrow n$
3 10 $begin\left\{matrix\right\} underbrace\left\{10_\left\{\right\}^\left\{10^\left\{\left\{\right\}^\left\{.,^\left\{.,^\left\{.,^\left\{10\right\}\right\}\right\}\right\}\right\}\right\}\right\} 10mbox\left\{ copies of \right\}10 end\left\{matrix\right\}$ $begin\left\{matrix\right\} underbrace\left\{10_\left\{\right\}^\left\{10^\left\{\left\{\right\}^\left\{.,^\left\{.,^\left\{.,^\left\{10\right\}\right\}\right\}\right\}\right\}\right\}\right\} 10^\left\{10\right\}mbox\left\{ copies of \right\}10 end\left\{matrix\right\}$ $begin\left\{matrix\right\} underbrace\left\{10_\left\{\right\}^\left\{10^\left\{\left\{\right\}^\left\{.,^\left\{.,^\left\{.,^\left\{10\right\}\right\}\right\}\right\}\right\}\right\}\right\} 10^\left\{10^\left\{10\right\}\right\}mbox\left\{ copies of \right\}10 end\left\{matrix\right\}$   $10uparrowuparrowuparrow n$
4 10 $begin\left\{matrix\right\} underbrace\left\{^\left\{^\left\{^\left\{^\left\{^\left\{10\right\}.\right\}.\right\}.\right\}10\right\}10\right\} 10mbox\left\{ copies of \right\}10 end\left\{matrix\right\}$ $begin\left\{matrix\right\} underbrace\left\{^\left\{^\left\{^\left\{^\left\{^\left\{10\right\}.\right\}.\right\}.\right\}10\right\}10\right\} 10^\left\{10\right\}mbox\left\{ copies of \right\}10 end\left\{matrix\right\}$     $10uparrowuparrowuparrowuparrow n$

Note that for 2 ≤ n ≤ 9 the numerical order of the numbers $10uparrow^m n$ is the lexicographical order with m as the most significant number, so for the numbers of these 8 columns the numerical order is simply line-by-line. The same applies for the numbers in the 97 columns with 3 ≤ n ≤ 99, and if we start from m = 1 even for 3 ≤ n ≤ 9,999,999,999.