# Knuth's up-arrow notation

It has been suggested that this article be merged into
Hyperoperation. (Discuss) Proposed since November 2014. |

In mathematics, **Knuth's up-arrow notation** is a method of notation for very large integers, introduced by Donald Knuth in 1976.^{[1]} It is closely related to the Ackermann function and especially to the hyperoperation sequence. The idea is based on the fact that multiplication can be viewed as iterated addition and exponentiation as iterated multiplication. Continuing in this manner leads to iterated exponentiation (tetration) and to the remainder of the hyperoperation sequence, which is commonly denoted using Knuth arrow notation.

## Contents

## Introduction

The ordinary arithmetical operations of addition, multiplication and exponentiation are naturally extended into a sequence of hyperoperations as follows.

Multiplication by a natural number is defined as iterated addition:

For example,

Exponentiation for a natural power is defined as iterated multiplication, which Knuth denoted by a single up-arrow:

For example,

To extend the sequence of operations beyond exponentiation, Knuth defined a “double arrow” operator to denote iterated exponentiation (tetration):

For example,

Here and below evaluation is to take place from right to left, as Knuth's arrow operators (just like exponentiation) are defined to be right-associative.

According to this definition,

- 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 tetration (pentation):

followed by a “quadruple arrow“ operator for iterated pentation (hexation):

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

Examples:

The notation is commonly used to denote with *n* arrows. In fact, is *a* [*n*+2] *b* with hyperoperation. For example, can also be written as 39 [4] 14, the "[4]" means tetration, but it does not equal to 39 [2] 14 = 39 × 14 = 546, similarly, = 77 [79] 77 instead of 77 [77] 77.

## Notation

In expressions such as , the notation for exponentiation is usually to write the exponent as a superscript to the base number . But many environments — such as programming languages and plain-text e-mail — do not support superscript typesetting. People have adopted the linear notation 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 doesn't lend itself well to generalization, which explains why Knuth chose to work from the inline notation instead.

is a shorter alternative notation for n uparrows. Thus .

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

Attempting to write using the familiar superscript notation gives a power tower.

- For example:

If *b* is a variable (or is too large), the power tower might be written using dots and a note indicating the height of the tower.

Continuing with this notation, could be written with a stack of such power towers, each describing the size of the one above it.

Again, if *b* is a variable or is too large, the stack might be written using dots and a note indicating its height.

Furthermore, might be written using several columns of such stacks of power towers, each column describing the number of power towers in the stack to its left:

And more generally:

This might be carried out indefinitely to represent as iterated exponentiation of iterated exponentiation for any *a*, *n* and *b* (although it clearly becomes rather cumbersome).

#### Using tetration

The tetration notation allows us to make these diagrams slightly simpler while still employing a geometric representation (we could call these *tetration towers*).

Finally, as an example, the fourth Ackermann number could be represented as:

## Generalizations

Some numbers are so large that multiple arrows of Knuth's up-arrow notation become too cumbersome; then an *n*-arrow operator 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. 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.

It is generally suggested^{[by whom?]} that Knuth's arrow should be used for smaller magnitude numbers, and the chained arrow or hyper operators for larger ones.

## Definition

The up-arrow notation is formally defined by

for all integers with .

This definition takes multiplication as the basic operation , then yields exponentiation as repeated multiplication, tetration as repeated exponentiation, etc. (This is equivalent to the hyperoperation sequence except it omits the two more-basic operations of successor and addition, inclusion of which requires additional starting values that somewhat complicate the definition.)

All up-arrow operators (including normal exponentiation, ) are right associative, i.e. evaluated from right to left in an expression.

—— not .

is —— not

Note that due to right-associativity we have, for ,

where each appears as a left operand of the arrow operator (which is significant because the arrow operators are not commutative), and we have written for the *b*th functional power of the function . Because , the original definition can therefore be written more concisely as follows:

for all integers with .

## Tables of values

### Computing 2↑^{m}*n*

Computing can be restated in terms of an infinite table. We place the numbers 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.

m\n |
1 | 2 | 3 | 4 | 5 | 6 | formula |
---|---|---|---|---|---|---|---|

1 | 2 | 4 | 8 | 16 | 32 | 64 | |

2 | 2 | 4 | 16 | 65536 | |||

3 | 2 | 4 | 65536 | ||||

4 | 2 | 4 |

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

### Computing 3↑^{m}*n*

We place the numbers 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.

m\n |
1 | 2 | 3 | 4 | 5 | formula |
---|---|---|---|---|---|---|

1 | 3 | 9 | 27 | 81 | 243 | |

2 | 3 | 27 | 7,625,597,484,987 | |||

3 | 3 | 7,625,597,484,987 | ||||

4 | 3 |

### Computing 10↑^{m}*n*

We place the numbers 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.

m\n |
1 | 2 | 3 | 4 | 5 | formula |
---|---|---|---|---|---|---|

1 | 10 | 100 | 1,000 | 10,000 | 100,000 | |

2 | 10 | 10,000,000,000 | ||||

3 | 10 | |||||

4 | 10 |

Note that for 2 ≤ *n* ≤ 9 the numerical order of the numbers 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.

## Numeration systems based on the hyperoperation sequence

R. L. Goodstein,^{[2]} with a system of notation different from Knuth arrows, used the sequence of hyperoperators here denoted by to create systems of numeration for the nonnegative integers. Letting superscripts ([1], [2], [3], [4], ... ) denote the respective hyperoperators , the so-called *complete hereditary representation* of integer *n*, at level *k* and base *b*, can be expressed as follows using only the first *k* hyperoperators and using as digits only 0, 1, ..., *b* - 1, together with the base *b* itself:

- For 0 ≤
*n*≤*b*-1,*n*is represented simply by the corresponding digit. - For
*n*>*b*-1, the representation of*n*is found recursively, first representing*n*in the form

*b*[*k*]*x*_{k}[*k*- 1]*x*_{k-1}[*k*- 2] ... [2]*x*_{2}[1]*x*_{1}- where
*x*_{k}, ...,*x*_{1}are the largest integers satisfying (in turn)

*b*[*k*]*x*_{k}≤*n*

*b*[*k*]*x*_{k}[*k*- 1]*x*_{k - 1}≤*n*

- ...

*b*[*k*]*x*_{k}[*k*- 1]*x*_{k - 1}[*k*- 2] ... [2]*x*_{2}[1]*x*_{1}≤*n*

- Any
*x*_{i}exceeding*b*-1 is then re-expressed in the same manner, and so on, repeating this procedure until the resulting form contains only the digits 0, 1, ...,*b*-1, together with the base*b*.

The remainder of this section will use the superscripts to denote the hyperoperators.

Unnecessary parentheses can be avoided by giving higher-level operators higher precedence in the order of evaluation; thus,

level-1 representations have the form b [1] X, with *X* also of this form;

level-2 representations have the form b [2] X [1] Y, with *X*,*Y* also of this form;

level-3 representations have the form b [3] X [2] Y [1] Z, with *X*,*Y*,*Z* also of this form;

level-4 representations have the form b [4] X [3] Y [2] Z [1] W, with *X*,*Y*,*Z*,*W* also of this form;

and so on.

Note that in this type of base-*b* *hereditary* representation, the base itself appears in the expressions, as well as "digits" from the set {0, 1, ..., *b*-1}. This compares to *ordinary* base-2 representation when the latter is written out in terms of the base *b*; e.g., in ordinary base-2 notation, 6 = (110)_{2} = 2 [3] 2 [2] 1[1] 2 [3] 1 [2] 1[1] 2 [3] 0 [2] 0, whereas the level-3 base-2 hereditary representation is 6 = 2 [3] (2 [3] 1 [2] 1 [1] 0) [2] 1 [1] (2 [3] 1 [2] 1 [1] 0). The hereditary representations can be abbreviated by omitting any instances of [1] 0, [2] 1, [3] 1, [4] 1, etc.; for example, the above level-3 base-2 representation of 6 abbreviates to 2 [3] 2 [1] 2.

Examples: The unique base-2 representations of the number 266, at levels 1, 2, 3, 4, and 5 are as follows:

- Level 1: 266 = 2 [1] 2 [1] 2 [1] ... [1] 2 (with 133 2s)
- Level 2: 266 = 2 [2] (2 [2] (2 [2] (2 [2] 2 [2] 2 [2] 2 [2] 2 [1] 1)) [1] 1)
- Level 3: 266 = 2 [3] 2 [3] (2 [1] 1) [1] 2 [3] (2 [1] 1) [1] 2
- Level 4: 266 = 2 [4] (2 [1] 1) [3] 2 [1] 2 [4] 2 [2] 2 [1] 2
- Level 5: 266 = 2 [5] 2 [4] 2 [1] 2 [5] 2 [2] 2 [1] 2

## See also

- Primitive recursion
- Hyperoperation
- Busy beaver
- Cutler's bar notation
- Tetration
- Pentation
- Conway's chained arrow notation
- Ackermann function
- Graham's number
- Steinhaus–Moser notation

## References

- ↑ Knuth, Donald E. (1976). "Mathematics and Computer Science: Coping with Finiteness".
*Science*.**194**(4271): 1235–1242. doi:10.1126/science.194.4271.1235. PMID 17797067.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles> - ↑ Goodstein, R. L. (1947). "Transfinite ordinals in recursive number theory".
*Journal of Symbolic Logic*.**12**(4): 123–129. doi:10.2307/2266486. JSTOR 2266486.<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>

## External links

- Weisstein, Eric W., "Arrow Notation",
*MathWorld*. - Robert Munafo,
*Large Numbers*